ランキングに戻る

oracle/graaljs

C++graalvm.org/javascript/

GraalJS – A high-performance, ECMAScript compliant, and embeddable JavaScript runtime for Java

graalvmjavascriptnodejsjava
スター成長
スター
2k
フォーク
212
週間成長
Issue
144
5001k1.5k2k
2018年4月2021年1月2023年10月2026年7月
README

https://graalvm.slack.com

GraalJS

GraalJS is a JavaScript engine implemented in Java on top of GraalVM. It is an ECMAScript-compliant runtime to execute JavaScript and Node.js applications, and includes all the benefits from the GraalVM stack including interoperability with Java. GraalJS is an open-source project.

The goals of GraalJS are:

Getting Started

As of version 23.1.0, GraalJS is available as Maven artifacts. We also provide standalone distributions of the JavaScript and Node.js runtimes.

Maven Artifacts

Thanks to GraalJS, you can easily embed JavaScript into a Java application. All necessary artifacts can be downloaded directly from Maven Central.

All artifacts relevant to embedders can be found in the Maven dependency group org.graalvm.polyglot.

Below is a minimal Maven dependency setup that you can copy into your pom.xml:

<dependency>
    <groupId>org.graalvm.polyglot</groupId>
    <artifactId>polyglot</artifactId>
    <version>${graaljs.version}</version>
</dependency>
<dependency>
    <groupId>org.graalvm.polyglot</groupId>
    <artifactId>js</artifactId>
    <version>${graaljs.version}</version>
    <type>pom</type>
</dependency>

This enables GraalJS which is built on top of Oracle GraalVM and licensed under the GraalVM Free Terms and Conditions (GFTC). Use js-community if you want to use GraalJS built on GraalVM Community Edition.

To access polyglot isolate artifacts (GFTC only), use the -isolate suffix instead (e.g. js-isolate).

See the polyglot embedding demonstration on GitHub for a complete runnable example.

You can use GraalJS with GraalVM JDK, Oracle JDK, or OpenJDK. If you prefer running on a stock JVM, have a look at Run GraalJS on a Stock JDK. Note that in this mode many features and optimizations of GraalVM are not available. Due to those limitations, running on a stock JVM is not a supported feature - please use a GraalVM instead.

Standalone Distributions

Standalone distributions are published on GitHub. There are two language runtime options to choose from:

  • Native launcher compiled ahead of time with GraalVM Native Image;
  • JVM-based runtime.

To distinguish between them, a standalone that comes with a JVM has a -jvm infix in the name. Also, the GraalVM Community Edition version has -community in the name, for example, graaljs-community-<version>-<os>-<arch>.tar.gz.

Four different configurations are available for each component and platform combination:

Runtime License Archive Infix
Native GFTC none
JVM GFTC -jvm
Native UPL -community
JVM UPL -community-jvm

To install GraalJS from a standalone, download and extract the archive from the GitHub Releases page. After the installation, the js or node executable in the bin subdirectory can be used to run JavaScript files or Node modules, respectively. If no file is provided on the command line, an interactive shell (REPL) will be spawned.

Note: If you are using macOS, first remove the quarantine attribute from the archive: shell sudo xattr -r -d com.apple.quarantine <archive>.tar.gz

Node.js Runtime

GraalJS can run unmodified Node.js applications. GraalVM's Node.js runtime is based on a recent version of Node.js, and runs the GraalJS engine instead of Google V8. It provides high compatibility with the existing NPM packages. This includes NPM packages with native implementations. Note that some NPM modules may require to be recompiled from source with GraalJS (if they ship with binaries that have been compiled for Node.js based on V8).

Node.js is available as a separate standalone distribution. See how to get started with Node.js.

Documentation

Extensive user documentation is available on the website. In addition, there is documentation in this repository under docs, for users and contributors. For contributing, see also a guide on how to build GraalJS from source code.

Compatibility

GraalJS is compatible with the ECMAScript 2026 specification. New features, new ECMAScript proposals, scheduled to land in future editions, are added frequently and are accessible behind an option. See the CHANGELOG.md for the proposals already adopted.

In addition, some popular extensions of other engines are supported. See GraalJS Compatibility.

Operating Systems Compatibility

The core JavaScript engine is a Java application and is thus compatible with every operating system that provides a compatible JVM. See Run GraalJS on a Stock JDK. We provide binary distributions and fully support GraalJS on Linux (x64, AArch64), macOS (AArch64), and Windows (x64).

Stay Connected with the Community

See graalvm.org/community for how to stay connected with the development community. The channel graaljs on graalvm.slack.com is a good way to get in touch with the team behind GraalJS. Report any GraalJS-specific issues at the oracle/graaljs GitHub repository.

License

GraalJS source code and community distributions are available under the Universal Permissive License (UPL), Version 1.0.

Non-community artifacts are provided under the GraalVM Free Terms and Conditions (GFTC) including License for Early Adopter Versions.

関連リポジトリ
lysine-dev/okhttp

A meticulous HTTP client for the JVM, Android, and GraalVM.

KotlinApache License 2.0javaandroid
lysine.dev/okhttp/
47k9.3k
square/okhttp

Square’s meticulous HTTP client for the JVM, Android, and GraalVM.

KotlinApache License 2.0javaandroid
square.github.io/okhttp/
46.2k9.2k
oracle/graal

GraalVM compiles applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀

JavaMavenOtherjavaaot
graalvm.org
21.6k1.8k
enso-org/enso

Enso Analytics is a self-service data prep and analysis platform designed for data teams.

JavaMavenApache License 2.0visuallanguage
ensoanalytics.com
7.4k343
oracle/docker-images

Official source of container configurations, images, and examples for Oracle products and projects

ShellUniversal Permissive License v1.0dockeroracle-database
developer.oracle.com/use-cases/
7k5.4k
remkop/picocli

Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.

JavaMavenApache License 2.0javacommandline
picocli.info
5.4k473
babashka/babashka

Native, fast starting Clojure interpreter for scripting

ClojureEclipse Public License 1.0clojureshell-scripting
babashka.org
4.6k273
truffleruby/truffleruby

A high performance implementation of the Ruby programming language, built on GraalVM.

RubyRubyGemsOthergraalvmruby
truffleruby.dev
3.2k212
oracle/truffleruby

A high performance implementation of the Ruby programming language, built on GraalVM.

RubyRubyGemsOthergraalvmruby
graalvm.org/ruby/
3.1k188
spring-attic/spring-native

Spring Native is now superseded by Spring Boot 3 official native support

JavaMavenApache License 2.0springspring-boot
docs.spring.io/spring-boot/docs/current/reference/html/native-image.html
2.7k343
clj-kondo/clj-kondo

Static analyzer and linter for Clojure code that sparks joy

ClojureEclipse Public License 1.0clojureclojurescript
1.8k305
graalvm/graalvm-ce-builds

GraalVM CE binaires built by the GraalVM community

graalvmbuilds
graalvm.org
1.7k123