5 ms·
Hasn't Nashorn been superseded by GraalJS? Is this just for those who are stuck with Nashorn, or will there be new development? GraalJS is ECMASCript 2020 com
by hansjorg 6y ago
Hasn't Nashorn been superseded by GraalJS?
Is this just for those who are stuck with Nashorn, or will there be new development?
GraalJS is ECMASCript 2020 compatible and is said to rival V8 on performance, so I would've thought it the obvious choice for new projects going forward.
https://github.com/graalvm/graaljs https://github.com/graalvm/graaljs
Edit: found more info about this release in the initial announcement:
https://mail.openjdk.java.net/pipermail/nashorn-dev/2020-October/007557.html https://mail.openjdk.java.net/pipermail/nashorn-dev/2020-Oct...
- cogman10 6y agoFor the most part yes. The only reason to use this is either you care about the smaller runtime or you have some dependency that can't function without nashorn.
- didibus 6y agoIsn't GraalJS restricted in usage though? Like it can only be used as part of Oracle GraalVM, not any other JVM distribution?
- hansjorg 6y agoFrom the readme: > The preferred way to run GraalVM JavaScript is from a GraalVM. If you prefer running it on a stock JVM, please have a look at the documentation in RunOnJDK.md. I'm running it on a stock OpenJDK JVM without any issue, just by including a Maven dependency. For best performance you should run it on GraalVM (where the Community Edition is based on OpenJDK).
- didibus 6y agoOh that's awesome, thanks for letting me know.
- KajMagnus 6y agoThe GraalJS license is apparently similar to MIT: https://github.com/graalvm/graaljs/blob/master/LICENSE https://github.com/graalvm/graaljs/blob/master/LICENSE "The Universal Permissive License (UPL), Version 1.0" And about the UPL: https://tldrlegal.com/license/universal-permissive-license-1.0-(upl-1.0) https://tldrlegal.com/license/universal-permissive-license-1... "... including an explicit patent grant, clear ability to relicense ..."
- chrisseaton 6y agoJVMCI (the interface GraalJS uses to talk to the compiler, rather than going through bytecode, as Nashorn does) is now a standard part of OpenJDK.
- blackmagicjs 6y agoIs GraalJS just an interface to NodeJS, or why do they mention the NodeJS API?
- augustl 6y agoThey have both. GraalJS itself is just a JS runtime, but they've also made a separate package that reimplements the Node stdlib (but doesn't work on Windows yet, for example)
- blackmagicjs 6y agoGood to know, thanks!
- needusername 6y ago> Hasn't Nashorn been superseded by GraalJS? It depends, do you want support for your JVM? If so: * Graal CE has no support * Graal EE requires either running on Oracle Cloud or calling Oracle Sales for a custom quote. These are non-starters for many. * JVMCI requires `-XX:+UnlockExperimentalVMOptions` which often voids support. * I believe Mandrel is supported but requires RHEL