A high performance implementation of the JavaScript programming language. Built on the GraalVM by Oracle Labs.
The goals of GraalVM JavaScript are:
- Execute JavaScript code with best possible performance
- Full compatibility with the latest ECMAScript specification
- Support Node.js applications, including native packages (check)
- Allow simple upgrading from Nashorn or Rhino based applications
- Fast interoperability with Java, Scala, or Kotlin, or with other GraalVM languages like Ruby, Python, or R
- Be embeddable in systems like Oracle RDBMS or MySQL
See the documentation on the GraalVM website how to install and use GraalVM JavaScript.
$ $GRAALVM/bin/js
> print("Hello JavaScript");
Hello JavaScript
>
The preferred way to run GraalVM JavaScript is from a GraalVM.
If you prefer running it on a stock JVM, please have a look at the documentation in RunOnJDK.md
.
Extensive documentation is available on graalvm.org: how to Run JavaScript
and the more extensive JavaScript & Node.js Reference Manual
.
In addition there is documentation in the source code repository in the docs
folder, for users
and contributors
of the engine.
For contributors, a guide how to build GraalVM JavaScript from source code can be found in Building.md
.
GraalVM JavaScript is compatible with the ECMAScript 2020 specification.
Starting with GraalVM 21.0.0, ECMAScript 2021 - currently at the draft stage - is the default compatibility level.
New features, e.g. ECMAScript proposals
scheduled to land in future editions, are added frequently and are accessible behind a flag.
In addition, some popular extensions of other engines are supported, see JavaScriptCompatibility.md
.
GraalVM JavaScript 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 some npm modules will require to be re-compiled from source with GraalVM JavaScript if they ship with binaries that have been compiled for Node.js based on V8.
Node.js support is only available in full GraalVM releases, but not in the standalone
GraalVM JavaScript distribution.
The core JavaScript engine is a Java application and is thus in principle compatible with every operating system that provides a compatible JVM, see RunOnJDK.md
.
We test and support GraalVM JavaScript currently in full extent on Linux and MacOS.
For Windows, a preliminary preview version is available.
Some features, including the Node.js support, are currently not supported on all platforms (e.g. Windows).
A reference manual for GraalVM JavaScript is available on the GraalVM website.
See graalvm.org/community on how to stay connected with the development community. The channel graaljs on graalvm.slack.com is a good way to get in touch with us.
GraalVM JavaScript is available under the following license: