Meet GraalVM, Oracle’s polyglot virtual machine
© Shutterstock /dencg
Oracle’s GraalVM aims to remove the isolation between programming languages and enable interoperability in a shared runtime. The tech giant sees GraalVM as a language-level virtualization layer which allows leveraging tools and embeddings across all languages.
Having one single VM that would provide high performance for all programming languages, therefore facilitating communication between programs sounds like a dream, right? Not anymore. After years of research and development, Oracle is ready to introduce GraalVM to the world — have a look at its first production-ready release.
According to the blog post announcing the availability of GraalVM 1.0, this universal virtual machine designed for a polyglot world offers “high performance for individual languages and interoperability with zero performance overhead for creating polyglot applications. Instead of converting data structures at language boundaries, GraalVM allows objects and arrays to be used directly by foreign languages.”
You can use whatever language you think is most productive to solve the task at hand
GraalVM 1.0 allows you to run
– JVM-based languages like Java, Scala, Groovy, or Kotlin
– LLVM bitcode (created from programs written in e.g. C, C++, or Rust)
– Experimental versions of Ruby, R, and Python
Furthermore, this polyglot VM can run standalone, embedded as part of platforms such as OpenJDK or Node.js, or inside databases such as MySQL or the Oracle RDBMS.
Applications can be deployed flexibly across the stack via the standardized GraalVM execution environments. In the case of data processing engines, GraalVM directly exposes the data stored in custom formats to the running program without any conversion overhead.
One of the best parts about the GraalVM ecosystem is the language-agnostic tooling that can be applied to all GraalVM deployments. The core GraalVM installation provides a language-agnostic debugger, profiler, and heap viewer.
Get started with GraalVM
GraalVM gives you enhanced performance for JVM-based applications written in languages such as Java, Scala, Groovy or Kotlin thanks to Graal, a dynamic compiler which improves efficiency and speed of applications. The Graal compiler is also available as an experimental option in JDK 10. However, you should be using it with GraalVM if you want to unlock the latest features and boost performance.
If you want to find out more about GraalVM, you should check out the reference manual. All you have to do is choose your favorite language and go to its page. But before you do that, you should make sure the libraries and modules you use as dependencies work with GraalVM. To do it, please use the GraalVM Language Compatibility tool.