yesdog / graaljs

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 is from a GraalVM. Starting with GraalVM 22.2., GraalVM JavaScript is an installable component that needs to be installed with gu install js after downloading GraalVM. See the documentation on the GraalVM website for more information on how to install and use GraalVM JavaScript.

Installing GraalVM JavaScript using the GraalVM Updater:

$ $GRAALVM/bin/gu install js
$ $GRAALVM/bin/js --version

After installation, the js shell can be executed and used to run JavaScript code or execute JavaScript files.

$ $GRAALVM/bin/js
> print("Hello JavaScript");
Hello JavaScript
>

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

Current Status

GraalVM JavaScript is compatible with the ECMAScript 2022 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 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.

Similar to JavaScript itself, Node.js is a separately installable component of GraalVM (since 21.1). It can be installed using the GraalVM Updater:

$ $GRAALVM/bin/gu install nodejs
$ $GRAALVM/bin/node --version

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 test and support GraalVM JavaScript currently in full extent on Linux AMD64, Linux AArch64, MacOS, and Windows.

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.

Licence

GraalVM JavaScript is available under the following license:

About

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

License:Universal Permissive License v1.0


Languages

Language:C++ 33.1%Language:Assembly 17.9%Language:JavaScript 14.9%Language:C 13.5%Language:Perl 12.7%Language:Java 4.6%Language:Python 2.0%Language:HTML 0.4%Language:Roff 0.2%Language:Shell 0.2%Language:M4 0.1%Language:Makefile 0.1%Language:TypeScript 0.1%Language:Starlark 0.1%Language:CMake 0.0%Language:Batchfile 0.0%Language:CSS 0.0%Language:DTrace 0.0%Language:Jsonnet 0.0%Language:Emacs Lisp 0.0%Language:PowerShell 0.0%Language:R 0.0%Language:Scheme 0.0%Language:Vim Script 0.0%Language:DIGITAL Command Language 0.0%Language:eC 0.0%Language:Module Management System 0.0%Language:Awk 0.0%Language:NASL 0.0%Language:sed 0.0%Language:Dockerfile 0.0%