graal + node.js: how does it work?

Jaroslav Tulach jaroslav.tulach at
Tue Dec 19 08:52:49 UTC 2017

Hello Adam,
thanks for your interest in graal + node.js. I am maintaining
archetype. Would you find its approach useful?

On pondělí 18. prosince 2017 22:55:46 CET 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?
> [1] Node.js core was re-written from c++ to java (this seems to be the old
> avatar project??)

No, not at all. 

> [2] Graal.js calls into the java implementation of node for the JVM.


> Does the above sound correct?

node.js is using v8.h to perform its calls into JavaScript. Jan Štola has 
reimplemented v8.h, so it calls into our (Java based) implementation of 
Graal.js. Except v8.h (and related) the rest of node.js code is unmodified. As 
such we believe we can be more compatible than original Avatar.js based 

> 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. 

Nice. Our group would be interested in comparing the speed - our desire is to 
make Java/JavaScript/node.js interop fast - faster than any other available.

Good luck and let us know your graal+node.js related findings & thoughts.

More information about the graal-dev mailing list