Write Polyglot Programs with GraalVM Enterprise

GraalVM Enterprise allows to write polyglot applications with a seamless way to pass values from one language to another by means of a new Language Implementation framework, called Truffle. Truffle framework is a Java library for building programming languages implementations as interpreters for self-modifying Abstract Syntax Trees. It provides the interoperability between languages and tools, and supplies language-agnostic infrastructure to realize standard IDE features. When writing a language interpreter with Truffle Language Implementation framework, it will automatically use the GraalVM compiler on your behalf to enable a just-in-time compiler for the language.

A detailed explanation on writing and running polyglot applications is available by this link.

Polyglot Options for GraalVM Language Launchers

Polyglot options allow users of any language launcher to access the options of other GraalVM supported languages. The format is:

--<languageID>.<property>=<value>

Allowed values for the languageID are:

Language ID description
js languageID for JavaScript
python languageID for Python
r languageID for R
ruby languageID for Ruby
llvm languageID for LLVM

Property values available for the languageID may differ. Use --help:languages to find out which options are available.

Options for polyglot tools work in the same way with the following format:

--<toolID>.<property>=<value>

Allowed values for <toolID> are:

Tool ID Description
inspect Allow debugging with Chrome DevTools.
cpusampler Collect data about CPU usage.
cputracer Capture trace information about CPU usage.
memtracer Capture trace information about memory usage.

Use --help:tools to find out which options are available.