-
Hi there, I'm the maintainer of a project that lets you run JS scripts for Spigot plugins, and one of the features we've wanted a while is (full) node support. We currently have require and a lot of the core implemented but we're looking for more. Does Javet support core node modules (like events, http, etc)? Also, how performant is V8 mode compared to GraalJS? Just curious, thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thank you for asking the questions. Does Javet support core node modules (like events, http, etc)?Yes, Javet has out-of-box support to all core Node.js modules. I wrote some test cases covering some modules. Given the fact that there are so many modules, I have to be selective on test coverage. You are welcome taking a try. Performance between V8 Mode and GraalVMI haven't tested that. Here is the quote from the official doc for your reference.
My humble opinion is in terms of performance tuning, V8 generates machine code whereas GraalVM generates byte code, I don't think GraalVM can outperform V8 in the near future. But, please don't compare Node.js with GraalVM because the V8 embedded in Node.js is very, very, very old. It has serious security issue, I suppose. |
Beta Was this translation helpful? Give feedback.
Thank you for asking the questions.
Does Javet support core node modules (like events, http, etc)?
Yes, Javet has out-of-box support to all core Node.js modules. I wrote some test cases covering some modules. Given the fact that there are so many modules, I have to be selective on test coverage. You are welcome taking a try.
Performance between V8 Mode and GraalVM
I haven't tested that. Here is the quote from the official doc for your reference.