Giter Club home page Giter Club logo

oracle / graaljs Goto Github PK

View Code? Open in Web Editor NEW
1.6K 64.0 181.0 854.3 MB

A ECMAScript 2023 compliant JavaScript implementation built on GraalVM. With polyglot language interoperability support. Running Node.js applications!

License: Universal Permissive License v1.0

Python 1.98% Java 3.95% JavaScript 12.50% Shell 0.27% Makefile 0.12% R 0.01% HTML 0.34% C++ 27.93% C 23.11% Perl 16.52% CMake 0.03% Batchfile 0.02% CSS 0.01% Roff 0.21% Assembly 12.96% DIGITAL Command Language 0.01% M4 0.06% eC 0.01% Emacs Lisp 0.01% Scheme 0.01%
graalvm javascript nodejs java

graaljs's Introduction

https://graalvm.slack.com

A high performance implementation of the JavaScript programming language. Built on the GraalVM by Oracle Labs.

The goals of GraalVM JavaScript are:

Getting Started

The preferred way to run GraalVM JavaScript (a.k.a. GraalJS) is from a GraalVM. As of GraalVM for JDK 21, (23.1), GraalVM JavaScript and Node.js runtimes are available as standalone distributions and Maven artifacts (but no longer as GraalVM components). See the documentation on the GraalVM website for more information on how to set up GraalVM JavaScript.

Standalone Distribution

To install GraalVM JavaScript using the [standalone distribution], simply download and extract the desired archive from the GitHub Releases page. The standalone archives for the JavaScript and Node.js distributions are named graaljs[-community][-jvm]-<version>-<os>-<arch>.tar.gz and graalnodejs[-community][-jvm]-<version>-<os>-<arch>.tar.gz, respectively. Four different available 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

After 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.

Maven Artifact

All required artifacts for embedding GraalVM JavaScript can be found in the Maven dependency group org.graalvm.polyglot.

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

<dependency>
	<groupId>org.graalvm.polyglot</groupId>
	<artifactId>polyglot</artifactId>
	<version>23.1.0</version>
</dependency>
<dependency>
	<groupId>org.graalvm.polyglot</groupId>
	<artifactId>js</artifactId>
	<version>23.1.0</version>
	<type>pom</type>
</dependency>
<!-- add additional languages and tools, if needed -->

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

Language and tool dependencies use the GraalVM Free Terms and Conditions (GFTC) license by default. To use community-licensed versions instead, add the -community suffix to each language and tool dependency, e.g.:

<dependency>
	<groupId>org.graalvm.polyglot</groupId>
	<artifactId>js-community</artifactId>
	<version>23.1.0</version>
	<type>pom</type>
</dependency>

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

If you prefer running it on a stock JVM, please have a look at the documentation in RunOnJDK.md. 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.

Documentation

Extensive documentation is available on graalvm.org: see Getting Started and the more extensive JavaScript and Node.js Reference Manual. In addition, there is documentation in the source code repository in the docs directory, for users and contributors.

For contributors, a guide how to build GraalVM JavaScript from source code can be found in Building.md.

Current Status

GraalVM JavaScript is compatible with the ECMAScript 2023 specification. New features, e.g. ECMAScript proposals scheduled to land in future editions, are added frequently and are accessible behind a flag. See the CHANGELOG.md for the proposals already adopted.

In addition, some popular extensions of other engines are supported, see JavaScriptCompatibility.md.

Node.js support

GraalVM JavaScript can execute Node.js applications. It provides high compatibility with existing npm packages, with high likelihood 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 is a separate standalone distribution.

Compatibility on Operating Systems

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 provide binary distributions and fully support GraalVM JavaScript on Linux (AMD64, AArch64), MacOS (AMD64, AArch64), and Windows (AMD64), currently.

GraalVM JavaScript Reference Manual

A reference manual for GraalVM JavaScript is available on the GraalVM website.

Stay connected with the community

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. Please report JavaScript-specific issues on the oracle/graaljs GitHub repository.

License

GraalVM JavaScript source code and community distributions are available under the following license:

Non-community artifacts are provided under the following license:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.