用不同编程语言编写的程序的不同部分相互互动?
例如,Nodejs具有“ HTTP”模块。使用此模块,您可以编写以下代码:
var server = new http.Server();
server.listen(3000);
但是JavaScript本身没有功能与硬件进行交互,因此据我了解,JavaScript代码与C.编写的Libuv库进行通信。此交互的原理是什么? 另外,我遇到了一些这样的短语:“ ...这是一个用c为...写的python库”,但我不明白这些项目如何工作。
For example, NodeJS has the "http" module. With this module you can write the following code:
var server = new http.Server();
server.listen(3000);
But JavaScript itself has no functionality to interact with the hardware, so from what I understand the JavaScript code communicates with the libuv library written in C. What is the principle of this interaction?
Also, I have come across some phrases like this: "...this is a Python library written in C for...", but I don't understand how such projects can work at all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论