I've been thinking about this question for a while and can't seem to find the answer. What is the relationship between Node.js and V8? and Can Node.js work without V8?
我已经思考这个问题一段时间了,似乎找不到答案。节点之间的关系是什么?js和V8吗?并能节点。没有V8 js工作?
2 个解决方案
#1
15
What is the relationship between Node.js and V8?
节点之间的关系是什么?js和V8吗?
V8 is the Javascript engine inside of node.js that parses and runs your Javascript. The same V8 engine is used inside of Chrome to run javascript in the Chrome browser. Google open-sourced the V8 engine and the builders of node.js used it to run Javascript in node.js.
V8是node内部的Javascript引擎。解析并运行Javascript的js。同样的V8引擎在Chrome浏览器中运行javascript。谷歌开放了V8引擎和node的构建器。js使用它在node.js中运行Javascript。
Can Node.js work without V8?
能节点。没有V8 js工作?
No. The current node.js binary cannot work without V8. It would have no Javascript engine and thus no ability to run code which would obviously render it non-functional. Node.js was not designed to run with any other Javascript engine and, in fact, all the native code bindings that come with node.js (such as the fs module or the net module) all rely on the specific V8 interface between C++ and Javascript.
不。当前节点。如果没有V8, js二进制文件就不能工作。它将没有Javascript引擎,因此没有运行代码的能力,这显然会使它失去功能。节点。js并没有被设计成与任何其他Javascript引擎一起运行,事实上,所有的本地代码绑定都是与node一起运行的。js(比如fs模块或net模块)都依赖于c++和Javascript之间特定的V8接口。
There is an effort by Microsoft to allow the Chakra Javascript engine (that's the engine in Edge) to be used with node.js. They build a V8 shim on top of Chakra so that the node.js binary code that expects to be talking to V8 can continue to do what it was doing, but actually end up talking to the Chakra engine underneath. From what I've read this is particularly targeted at Microsoft platforms that already have the Chakra engine and do not have the V8 engine running on them, though presumably you could use it on Windows too.
微软的一项努力是让Chakra Javascript引擎(这是Edge的引擎)与node.js一起使用。他们在脉轮的顶部建造一个V8垫片,这样节点就可以了。期望与V8进行对话的js二进制代码可以继续做它正在做的事情,但实际上最终与下面的脉轮引擎进行对话。从我所读到的内容来看,这是特别针对微软平台的,这些平台已经有了脉轮引擎,而且没有V8引擎在上面运行,不过你也可以在Windows上使用它。
#2
3
Node.js can actually function to some extent without V8, through use of the node-chakracore project. There is ongoing work to reduce the tight coupling between V8 and Node, so that different JavaScript engines can be used in-place.
节点。通过使用node-chakracore项目,js实际上可以在某种程度上使用没有V8的功能。有一些工作正在进行中,以减少V8和Node之间的紧密耦合,以便可以就地使用不同的JavaScript引擎。
#1
15
What is the relationship between Node.js and V8?
节点之间的关系是什么?js和V8吗?
V8 is the Javascript engine inside of node.js that parses and runs your Javascript. The same V8 engine is used inside of Chrome to run javascript in the Chrome browser. Google open-sourced the V8 engine and the builders of node.js used it to run Javascript in node.js.
V8是node内部的Javascript引擎。解析并运行Javascript的js。同样的V8引擎在Chrome浏览器中运行javascript。谷歌开放了V8引擎和node的构建器。js使用它在node.js中运行Javascript。
Can Node.js work without V8?
能节点。没有V8 js工作?
No. The current node.js binary cannot work without V8. It would have no Javascript engine and thus no ability to run code which would obviously render it non-functional. Node.js was not designed to run with any other Javascript engine and, in fact, all the native code bindings that come with node.js (such as the fs module or the net module) all rely on the specific V8 interface between C++ and Javascript.
不。当前节点。如果没有V8, js二进制文件就不能工作。它将没有Javascript引擎,因此没有运行代码的能力,这显然会使它失去功能。节点。js并没有被设计成与任何其他Javascript引擎一起运行,事实上,所有的本地代码绑定都是与node一起运行的。js(比如fs模块或net模块)都依赖于c++和Javascript之间特定的V8接口。
There is an effort by Microsoft to allow the Chakra Javascript engine (that's the engine in Edge) to be used with node.js. They build a V8 shim on top of Chakra so that the node.js binary code that expects to be talking to V8 can continue to do what it was doing, but actually end up talking to the Chakra engine underneath. From what I've read this is particularly targeted at Microsoft platforms that already have the Chakra engine and do not have the V8 engine running on them, though presumably you could use it on Windows too.
微软的一项努力是让Chakra Javascript引擎(这是Edge的引擎)与node.js一起使用。他们在脉轮的顶部建造一个V8垫片,这样节点就可以了。期望与V8进行对话的js二进制代码可以继续做它正在做的事情,但实际上最终与下面的脉轮引擎进行对话。从我所读到的内容来看,这是特别针对微软平台的,这些平台已经有了脉轮引擎,而且没有V8引擎在上面运行,不过你也可以在Windows上使用它。
#2
3
Node.js can actually function to some extent without V8, through use of the node-chakracore project. There is ongoing work to reduce the tight coupling between V8 and Node, so that different JavaScript engines can be used in-place.
节点。通过使用node-chakracore项目,js实际上可以在某种程度上使用没有V8的功能。有一些工作正在进行中,以减少V8和Node之间的紧密耦合,以便可以就地使用不同的JavaScript引擎。