| Graal is a native-code compiler for Java, implemented in Java. It can be used as a JIT or an AOT compiler. 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. |