I know these technologies are all related but could someone please explain what each one is used for and how they fit together?
1 Answers
Oversimplification:
Graal - Java bytecode compiler. Can be used just in time (as part of a JVM) or ahead of time.
SubstrateVM - other things (runtime) needed to actually run ahead-of-time compiled Java bytecode without a JVM. This powers the "native-image" command of GraalVM.
Truffle - framework for implementing languages as AST interpreters which can be just-in-time compiled using graal. Some notable languages implemented are JavaScript, Ruby, R and LLVM bitcode.
GraalVM - most of these technologies packaged together in order to support different use cases, for example: running JVM programs (i.e. anything that compiles to Java bytecode) using Graal as the JIT compiler for better peak performance, ahead-of-time compiling JVM programs for fast startup and low memory footprint, running fast dynamic languages (JS, R, Ruby) that can interoperate without overhead, and so on.
-
Thanks. Is GraalVM only for JDK 8 at this stage though? – Clancy Merrick Dec 31 '18 at 06:21
-
Yeah, the GraalVM team currently produces only JDK8 based builds. Which JDK version(s) are you interested in? – Oleg Šelajev Jan 02 '19 at 11:51
-
I was actually hoping for a JDK 10 or 11 build. And for it to keep up with the current JDK. Is there any reason why it's only based on JDK 8 at the moment? – Clancy Merrick Jan 03 '19 at 20:23
-
According to [this message](https://mail.openjdk.java.net/pipermail/graal-dev/2019-January/005617.html) on the Graal-dev mailing list, they are working on it but looks like a couple of features (like native image support which is mentioned) are not yet updated for JDK 11. – prunge Feb 15 '19 at 04:39