A look at GraalVM 20.0: better Windows support, better Native Images, better tooling

Oleg Šelajev
graalvm
Published in
4 min readMar 4, 2020

A few days ago we released GraalVM 20.0. It is available for download and if you haven’t looked at it yet, you should as it brings a number of exciting enhancements across the whole project.

Without the excellent collaboration of the GraalVM community the release would not be the same, so we would first like to thank the community for active participation. Every bit counts from reporting feedback to contributing with pull requests. Moreover, recently we learned about the improvements in Java ecosystem for the GraalVM native images with support in Hibernate and Tomcat.

GraalVM 20.0 is the release from the master branch while the 19.3.x branch continues to be maintained with the next release planned in April. We recommend updating to take advantage of new functionality and improvements. In this article we’d like to look at the most notable new features.

Improved Windows support

One of the most exciting news is improvements to the GraalVM builds for Windows bringing one of the most widely used operating system closer to having a fully functional GraalVM distribution.

Windows builds of GraalVM now include the functional gu utility to install components, for example: gu install native-image. The native-image component previously included in the base distribution on Windows is now separated and needs to be installed with gu .

An even more exciting fact is that the native-image on Windows is significantly improved and works the same way as on the other platforms. This is a great opportunity for developing command line tooling that doesn’t require a JVM at runtime.

A number of projects, like scalafmt, babashka, and others has been doing it for Linux and MacOS, and we’re excited to see if they would be interested in adding Windows executables to the mix.

If you encounter any problems with native images on Windows, please raise issues on GitHub.

Native images improvements

The previous release changed how GraalVM native image works under the hood by using JDK native code instead of manual substitutions. It was a necessary change to include the JDK 11 based builds and in the past month the team has fixed several issues regarding the native images and JNI. If you reported problems to GitHub, please check if the ones troubling you have been resolved.

Another great addition to the ecosystem is the introduction of an experimental low latency garbage collection implementation for native images in GraalVM Enterprise.

You can experiment with it by providing a -H:+UseLowLatencyGC option when building a native image. It will include a different GC implementation which reduces the duration of the stop-the-world pauses. Read more about the details on what is currently supported and how can you configure memory usage for native images on the GraalVM website.

More advanced tooling

Developer tools are an essential part of the GraalVM ecosystem. GraalVM is a unique polyglot runtime and without great support for typical developer tasks, its multi-language capabilities would not be as exciting as they are currently.

GraalVM 20.0 introduces a technology preview of the Language Server Protocol implementation. The Language Server Protocol is an approach to standardize language support for development tools to make an editor less coupled to the choice of language. Since GraalVM makes it possible to use one JIT compiler, GC, profiler, and other tools for multiple languages we’ve added a language server implementation for supported languages.

Currently it works best for JavaScript, other GraalVM languages need to add support for LSP. If you want to experiment with it, install the GraalVM extensions to VS Code, open a node.js application and run it with GraalVM.

Code completion in VS Code shows methods on the local variable `c` knowing its type information.

The application process will include the language server implementation that will collect information about variables and types in the running program and code completion in VS Code will be able to suggest possible methods using the information from the language server.

Conclusion

GraalVM 20.0 is a major release with a number of improvements across the board. In this release there is better Windows builds, improved ARM64 builds, upgrade of Node.js support to the 12.15, new tooling, tons of bugfixes related to native images, and of course performance enhancements.
Read a more detailed outline of the new and noteworthy features in the release notes.

Please download GraalVM 20.0, run your applications on it, report all and any feedback and continue to be a part of the GraalVM community and expand the GraalVM ecosystem.

— GraalVM team

--

--