4 ms·
But this will need Oracle's Graal rather than the one contributed to OpenJDK? Because of the JS runtime?
by boomskats 4y ago
But this will need Oracle's Graal rather than the one contributed to OpenJDK? Because of the JS runtime?
- sabellito 4y agoIt seems that openjdk is fine: https://reactiverse.io/es4x/get-started/install.html#graalvm-openjdk https://reactiverse.io/es4x/get-started/install.html#graalvm...
- notpushkin 4y agoI think the OpenJDK variant has had JS for a long time now, yeah.
- boomskats 4y agoHow can that be? I thought they only contributed the GraalVM Community Edition Java code to OpenJDK less than a month ago[0]. Also, quoting from the same announcement: > What parts of GraalVM Community Edition does Oracle plan to contribute to the OpenJDK Community? > Oracle plans to contribute the most applicable portions of the GraalVM just-in-time (JIT) compiler and Native Image. Oracle does not currently intend to contribute the polyglot technologies supporting other languages such as Python, Ruby, R, and JavaScript. I remembered the "Oracle does not currently intend to contribute the polyglot technologies supporting other languages such as Python, Ruby, R, and JavaScript" part of the original article, hence I asked the question. Edit: Did a bit more reading, and the main page for JS support on graalvm.org[1] has benchmarks comparing JS performance between V8, Graal CE and Graal EE. I assume that's what you were alluding to, and also answers my question (which I phrased in a bit of an xyproblem way). [0]: https://www.graalvm.org/2022/openjdk-announcement/ https://www.graalvm.org/2022/openjdk-announcement/ [1]: https://www.graalvm.org/javascript/ https://www.graalvm.org/javascript/
- notpushkin 4y agoYeah sorry, I got confused. You have to have the GraalVM installed, yeah. The open source CE will do.
- pjmlp 4y agoBoth are Oracle's, what was contributed is the community edition. And they still do like 90% of the OpenJDK work anyway.
- aseipp 4y agoNo, it shouldn't, from my quick glance. Here's a quick summary to help make things clear as mud. Graal is basically a compiler (very very incomplete summary but fine). Oracle is contributing it to OpenJDK as the JDK compiler. Truffle is a normal Java library and API for implementing programming languages in Java (again very high level incomplete summary) and it uses Graal to generate code. So you write your language in Java using Truffle as an API to do that, but get native code generated for it. They were developed together. And actually, you can actually use Truffle as a library without Graal in the mix, since it's "only" a Java library; it runs on a compatible JVM -- this is very useful for example, because the JDK running behind IntelliJ for code completion may not have Graal, but is just a normal JVM otherwise, and you really want code completion, test bench runners, etc, that require running your code under a normal JVM. But if Graal is there, it gets interesting, because fast code gets generated. This is again an incredibly incomplete summary but sufficient. It's important to understand that Truffle is the library for programming language authors, and the "source" of the polyglot capabilities -- while Graal is the code generator. The languages that the Graal team have implemented, such as JavaScript, are just clients of the Truffle library. Most Graal languages are just clients of Truffle and don't depend on the underlying JDK build or anything. If two languages are clients of the Truffle library, loaded into the same JVM, and properly implement the Polyglot API protocols, then they can also communicate, too. You can just have a dependency on the Truffle JavaScript implementation, like any normal Java dependency, and it will run on the Enterprise or normal open source JVM. The only reason you would force a dependency on the Enterprise Edition of Graal is if you relied in some specific Enterprise feature of theirs at the code level, but I don't know of any off hand; they're probably there, though. I believe you can detect this at runtime anyway and just do feature detection, too. There are more technical details, but that's the summary. It's unclear how this will all shake out once Graal is part of OpenJDK and developed there; I suspect the Polyglot languages developed by the teams at Oracle will be moved around, but the above description should (basically) still be accurate.
- boomskats 4y agoThanks for the clarification, appreciate it.