Could Node.js run client side in Chrome with its native client (to be released soon) Could Node.js run client side in Chrome with its native client (to be released soon) node.js node.js

Could Node.js run client side in Chrome with its native client (to be released soon)


Nowadays there are several solutions that allow you to run some Node modules in chrome. Have a look on these links:


As of today, Node.js will not run in NaCl, however it may be possible eventually. Node uses the V8 JavaScript engine to execute code. Currently there is no reliable port of the V8 engine that will run within NaCl.

From a comment by Brad Chen on Jan 28, 2014, in the thread "Has anyone tried porting Blink and V8 to Native Client?":

V8 has been ported to Native Client, although the port used an unsavory trick of having V8 generate ARM instructions and then use a portable ARM interpreter to avoid the need to port V8 code generators to NaCl. You should be able to observe this by checking out V8 source and following the standard build/test instructions using targets nacl_ia32 or nacl_x64.

https://groups.google.com/d/msg/native-client-discuss/Xw5yCe3Ubwc/fgm6M092DXwJ

Considering that V8 has already been able to run under NaCl, albeit with an unreliable hack, it's reasonable to assume that Node might eventually be able to run in NaCl. I realize your question is now three years old but figured I'd provide an updated answer since running native code (even OpenGL code) in the browser is now a reality.


node.js is not pure Javascript code. There are parts of it written in C++ so this is unlikely.

There are a couple of possibilities for distributed communication. One is to use the Websockets api in the browser to communicate with other browsers. The other one is to run node.js as a separate server process on the same machine as the browser.

This second is a better choice for building a distributed application because it reduces dependence on the browser. Version 0.5.0pre of node.js now builds OK on Cygwin and it is possible to bundle up the essential components of Cygwin as a standalone binary to distribute to Windows clients. Older versions of node.js used to be distributed this way.