The best way to get started with Graal.js is via the GraalVM, which includes compatible versions of everything you need as well as Graal.js.
GraalVM provides two main commands to execute applications,
bin/node. The first,
node, executes an instance of Node.js (v8.9.4) on top of Graal.js
In addition, you can use
bin/npm to install Node.js packages as normal with the Node package manager.
Graal.js aims to:
- Provide full compatibility with Node.js applications, including native packages
- Add fast and low-overhead interopability with languages natively supported on the JVM, e.g., Java, Scala, or Kotlin
- Add fast and low-overhead interopability with other GraalVM languages like Ruby, Python, or R
- Provide new tooling such as debuggers and monitoring
- All while being fully standard compliant to the latest ECMAScript specification (2017, currently)
Extensive documentation is available in
For instance, a guide how to build Graal.js from source code can be found in
Graal.js is compatible with the ECMAScript 2017 specification. New features, e.g. for the upcoming 2018 edition, are added frequently. In addition, some popular extensions of other engines are supported, see
Graal.js can execute Node.js applications. It provides high compatibility with existing npm packages, with high likelyhood that your application will run out of the box. This includes npm packages with native implementations. Note that you will need to re-compile from source with Graal.js if you want to run binaries that have beeen compiled for Node.js based on V8, or any other compatible engine.
Common questions about the status of Graal.js
Does the npm modules
If you are interested in executing an npm module and it fails on Graal.js, we would like to hear about the failure and your usage scenario. Please get in touch with us!
You don't need a JVM to run Graal.js. With the SubstrateVM it is possible to produce a single, statically linked native binary executable version of Graal.js, which doesn't need any JVM to run.
If you use a binary build of GraalVM to run Graal.js, by default you will be using SubstrateVM. You can deactivate it and use a normal JVM instead with the
Can Graal.js run on a standard JVM?
It is possible to run on an unmodified JDK 9 but you will have to build Graal yourself and we recommend using GraalVM instead.
Announcements about GraalVM, including Graal.js, are made on the graalvm-dev mailing list.
The main authors of Graal.js in order of joining the project are:
- Andreas Woess
- Christian Wirth
- Danilo Ansaloni
- Daniele Bonetta
- Jan Stola
- Jakub Podlesak
- Tomas Mysik
- Jirka Marsik
- Thomas Würthinger
- Josef Haider
- Christian Humer
Graal.js is available under the following license:
- The Universal Permissive License (UPL), Version 1.0; https://opensource.org/licenses/UPL
Graal.js contains code derived from OpenJDK Nashorn, Node.js, and V8.