Understanding Espresso (Java on Truffle)
GraalVM 21.0 is a major release that introduces a new guest language runtime called Java on Truffle. Before this, we had the option to run Java using HotSpot (which we covered in detail in Chapter 2, JIT, Hotspot, and GraalJIT), on Graal JIT (which we covered in Chapter 4, Graal Just-In-Time Compiler), or as a native image with Graal AOT (which we covered in Chapter 5, Graal Ahead-of-Time Compiler and Native Image). With GraalVM 21.0, Java on Truffle is the new runtime, which can run Java. It is codenamed Espresso. This is still in the experimental phase and is not production-ready at the time of writing this book. In this section, we will understand how to run Java applications with this new runtime, and how this can help polyglot programming.
Espresso is a cut-down version of JVM but implements all the core components of JVM, such as the bytecode interpreter, bytecode verifier, Java Native Interface, the Java Debug Wire Protocol...