|
|
|
|
|
by throwawaysml
3150 days ago
|
|
> Graal, Truffle, SubstrateVM, Sulong Is there a succinct explanation as to what those four projects are and how they would be combined in the hypothetical implementation you mention? The idea is to replace all of the JDK with a construction of those four, right? Would it still need a traditional JVM to execute the resulting toolchain or replace it fully? |
|
Truffle is a framework for implementing languages in Java, implemented in Java. Truffle can use Graal to automatically produce a JIT for languages implemented in it.
SubstrateVM is a JVM and AOT compiler using Graal, implemented in Java. With SubstrateVM you can take a Java program and produce a single, statically-linked executable with no dependency on the JVM.
Sulong is an interpreter for LLVM bitcode (so C, Fortran, Rust, etc programs) using Truffle, implemented in Java.
So together you can start to see how it's a system for 'one VM to rule them all' - all languages running with high performance in a single system.
It would be possible to write a Java bytecode interpreter, in Java, using Truffle, which would be JIT compiled using Graal, and to AOT compile that interpreter to a binary using SubstrateVM, which would give you a complete high-performance JVM implemented only in Java, yes.
Today enough of these components are available to produce a standalone high-performance Ruby or JavaScript VM, written entirely in Java, that has no dependency on the JVM.