graal + node.js: how does it work?
jan.stola at oracle.com
Tue Dec 19 09:42:28 UTC 2017
engine by default. It accesses it through its API (represented by v8.h
mainly). We keep all the native code of the original Node.js (almost)
We do that by providing an implementation of the native V8 API. Our
implementation of this API delegates to the corresponding Graal.js
calls. So, the native Node.js code "thinks" that it uses V8 still but it
is using Graal.js instead.
On 19.12.2017 4:55, Adam McMahon wrote:
> I am interested in learning more about graal + node.js, and I am wondering
> how node.js is integrated into graal/jvm?
> Can you let me know if the following is about correct?
>  Node.js core was re-written from c++ to java (this seems to be the old
> avatar project??)
>  Graal.js calls into the java implementation of node for the JVM.
> Does the above sound correct?
> I am interested in how node code can run well on the JVM. I have a partial
> implementation that I wrote of node.js modules that are a thin JS wrapper
> on top of vert.x Javasscript. This approach has worked well for me (still
> in early stages), but I was interested on you all have implemented node.js
More information about the graal-dev