Changes in GraalVM 0.26 on OTN
christian.humer at gmail.com
Thu Jul 27 12:52:04 UTC 2017
We have uploaded GraalVM 0.26 for Linux and macOS to:
Please note that the description on OTN is currently outdated. We will
update it soon.
This release contains some major changes/additions:
*) Sulong, a high-performance LLVM bitcode interpreter, now part of
With Sulong you can execute C/C++, Fortran, and other programs that can
be transformed to LLVM bitcode on Graal VM. To execute a program, you
have to compile the program to LLVM bitcode by a LLVM front end such as
To run programs in LLVM bitcode format on Graal VM, use the lli command.
For more details visit https://github.com/graalvm/sulong
*) A new GraalVM directory layout
The GraalVM is (once again) merged into a JVMCI-enabled JDK. This means
that we can configure our favorite IDEs to use GraalVM as a normal JDK.
In addition, we changed the directory structure as follows:
- languages have been moved from "./language" to "./jre/languages" (note
the trailing s!)
- "./jre/tools" is the new home for our builtin tools, which include the
agent, the chromeinspector integration and our command line profiling
- "./jre/lib/boot" contains all libraries that should be automatically
added to the bootclasspath
- the "graalvm" launcher has been renamed to "polyglot"
- the "aot-image" launcher has been renamed to "native-image"
Note that Truffle is still in "./jre/lib/truffle" and Graal in
*) Graal SDK
We added a new experimental API: the Graal SDK. In the future, it will
contain all Graal related APIs. At the moment, it contains two important
packages: "org.graalvm.polyglot" for Graal language embedding and
"org.graalvm.nativeimage" for native image customization. Please note
that this API is still experimental and it is likely to change in
incompatible ways in the next release.
*) Native images for all languages
We are now shipping with prebuilt native images for some of our guest
languages and guest language launchers. Currently, native images are
used by the "native-image", "polyglot", "js", "node", and "lli" (Sulong)
launchers. We will soon add native images for R and Ruby. Guest language
launchers can switch between native and jvm mode with "--native" and
"--jvm". The default is "--native".
*) New guest launchers with standardized VM options.
The launchers using native images accept new, standardized vm options.
This allows us to consistently specify jvm, native, language, tools and
compiler options for guest languages. We plan to extend this option
system to all our launchers.
Here is a list of the options that are / will be supported:
--polyglot Run with all other guest languages accessible.
--native Run using the native launcher with limited Java access
--native.[option] Pass options to the native image, e.g.,
"--native.Xmx1G". Use "--native.help" for further details.
--jvm Run on the Java Virtual Machine with Java access.
--jvm.[option] Pass options to the JVM, e.g.,
"--jvm.classpath=myapp.jar". Use "--jvm.help" for further details.
--version Print version information for all installed components.
--compiler.<option>=<value> set compiler options
--<languageId>.<option>=<value> set language option, e.g.,
--<instrumentId>[.<option>]=<value> set instrument option, e.g.,
"--agent" or "--cpusampler.MethodFilter=foobar"
*) Graal as default Java compiler for Truffle Languages.
>From now on Graal is our default Java host VM compiler when running
Truffle languages instead of C2 (a.k.a., server compiler).
*) Truffle Classloading Changes
With GraalVM 0.26, Truffle will no longer be on the bootclasspath.
Instead only the Graal SDK will automatically be on the bootclasspath
when running Java applications on GraalVM.
Truffle, the languages and tools are now loaded using the JVMCI class
loader. Classes loaded using the JVMCI classloader cannot not be
accessed from the application classpath any longer. Additional languages
or tools can be added by dropping them in "./jre/tools",
"./jre/languages", or by passing "-Dtruffle.class.path.append=" as VM
argument. Truffle languages and Instruments will no longer be loaded
from the application classpath.
To migrate your own Truffle guest language to bleeding edge v0.26 you
have two options:
1) You can either drop your language in the "./jre/languages" folder, or
pass "-Dtruffle.class.path.append=mylanguage.jar" as vm argument to put
it on the Truffle classpath. Your launcher (i.e., the code that runs
your scripts) needs to use the polyglot API in "graal-sdk.jar" instead
of the "com.oracle.truffle.api.vm" package classes (e.g.,
PolyglotEngine) in "truffle-api.jar". Graal-sdk.jar is automatically
added to the bootclasspath of GraalVM. Your launcher code and the code
to implement your language or tool need to be in separate jars. The
launcher can be on the application classpath, while the language/tool
implementation needs to be on the Truffle classpath.
2) You can pass "-XX:-UseJVMCIClassLoader" as vm argument to put all the
Truffle jars (including Graal) on the bootclasspath to make it
accessible to a normal Java application. This will make everything work
as with v0.25. This mode is not tested nor supported, but it can provide
a temporary workaround to get your language running with v0.26.
*) No Truffle Release
Typically we release a Truffle version with each GraalVM release. This
time we will skip to give us some more time to polish the new Graal SDK
APIs. The next Truffle release 0.27 is scheduled to be released with
GraalVM 0.27 in about a month from now. We will also include some more
information on guest language / tool migration to the new APIs at that
As always, feel free to ask questions.
More information about the graal-dev