GraalVM 21 serves up Espresso for speed and isolation

GraalVM 21

Oracle’s universal VM project GraalVM is now available in version 21, introducing an experimental Java Virtual Machine implementation that promises improved isolation and a slew of integrated tools.

The not yet production ready component called Espresso, in line with the Java coffee theme, uses the Truffle framework for building programming language implementations as interpreters. Alongside HotSpot VM and GraalVM’s just-in-time compiler, Espresso is the third tool that can be used to run Java programs on GraalVM, the difference being that it only runs compiled Java bytecode which makes it similar to WebAssembly. To do this, it needs access to class libraries and other JDK features present in the GraalVM distribution.

Since Espresso is written in Java, like Truffle and GraalVM, the project is building a “native image executable with the infrastructure to run Java on Truffle”. This in turn allows the addition of dynamic language features to apps based on native images to help with performance. Other features of the new Java on Truffle component include better ways to change classes at runtime (hot swapping), the ability to use Truffle’s profiling and code coverage tooling, and superior isolation of the host Java VM as well as the Java program.

Truffle itself also received an update, which includes support for explicitly selecting a host method overload, directives to guide the host compilations of Truffle interpreters, and a new default for –engine.MultiTier to reduce warm up time for said interpreters.


Espresso aside, GraalVM 21 comes with some improvements to Native Image, its ahead of time compilation technology. The new version contains capabilities to let devs use Java serialisation in native image binaries, improvements for method handle invocation, and experimental support for building native images of AWT and Swing applications on Linux.

The team has also improved support for JavaScript, Python, and Ruby. GraalVM 21 has therefore landed with an updated version of Node.js and an implementation of the relative indexing method proposal, and is able to work with a couple of new ECMAScript 2021 features such as class fields and Promise.any.

Python devs will be happy to learn that there’s support for the matplotlib visualisation library and some memory leak fixes. Ruby users will be able to use most features in version 2.7 of the language (remember, the latest version is 3.0) and use a workaround to speed up interactive Ruby.

Developers interested in GraalVM can find the Community Edition on GitHub. An Enterprise version of the new release does not seem to be available just yet.

- Advertisement -