GraalVM JavaScript

一个基于 GraalVM 构建的兼容 ECMAScript 2020 的 Javascript 实现。支持多语言互操作性。「A ECMAScript 2019 compliant Javascript implementation built on GraalVM. With polyglot language interoperability support.」

Github stars Tracking Chart

JavaScript 编程语言的高性能实现。基于 Oracle 实验室的 GraalVM 构建。

GraalVM JavaScript的目标是

入门

请参阅 GraalVM 网站 上的文档,了解如何安装和使用 GraalVM JavaScript。

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

运行 GraalVM JavaScript 的首选方式是在 GraalVM 上运行。如果你喜欢在普通的 JVM 上运行,请看一下 RunOnJDK.md 中的文档。

文档

graalvm.org 上有广泛的文档:如何 运行 JavaScript 和更广泛的 JavaScript 及 Node.js 参考手册 。此外,在 docs 文件夹下的源代码库中也有针对引擎 用户贡献者 的文档。

对于贡献者来说,可以在 Building.md 中找到如何从源代码构建 GraalVM JavaScript 的指南。

当前状态

GraalVM JavaScript 与 ECMAScript 2020 规范兼容。从 GraalVM 20.1.0 开始,ECMAScript 2020 是默认的兼容级别。新的功能,例如计划在未来版本中落地的 ECMAScript 提案,会被频繁添加。

此外,还支持其他引擎的一些流行扩展,请参见 ECMAScript 2020 specification
GraalVM JavaScript 可以执行 Node.js 应用。它与现有的 npm 包有很高的兼容性,你的应用很有可能在开箱后就能运行。这包括具有本地实现的 npm 包。需要注意的是,如果一些 npm 模块的二进制文件是基于 V8 的 Node.js 编译的,则需要用 GraalVM JavaScript 从源头重新编译。Node.js 支持只在完整的 GraalVM 版本中提供,但在独立的 GraalVM JavaScript 发行版中没有。

在操作系统上的兼容性

核心的 JavaScript 引擎是一个 Java 应用,因此原则上可以兼容所有提供兼容 JVM 的操作系统,参见 RunOnJDK.md。我们目前在 Linux 和 MacOS 上全面测试和支持 GraalVM JavaScript。对于 Windows,我们提供了一个初步的预览版本。

有些功能,包括 Node.js 的支持,目前还没有在所有平台上支持(例如 Windows)。

GraalVM JavaScript 参考手册

GraalVM JavaScript 的参考手册可在 GraalVM 网站 上获得。

与社区保持联系

关于如何与开发社区保持联系,请参见 graalvm.org/communitygraalvm.slack.com 上的 graaljs 频道是与我们联系的好方法。

许可证

GraalVM JavaScript 在以下许可证下可用。

(The first version translated by vz on 2020.09.29)

Overview

Name With Owneroracle/graaljs
Primary LanguageC++
Program languagePython (Language Count: 36)
PlatformLinux, Mac, Windows
License:Universal Permissive License v1.0
Release Count133
Last Release Namevm-ee-24.0.1 (Posted on )
First Release Namevm-enterprise-0.31 (Posted on )
Created At2018-04-17 09:55:23
Pushed At2024-05-14 05:15:11
Last Commit At2024-05-13 14:04:37
Stargazers Count1.6k
Watchers Count64
Fork Count180
Commits Count68.3k
Has Issues Enabled
Issues Count686
Issue Open Count110
Pull Requests Count14
Pull Requests Open Count6
Pull Requests Close Count114
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Join the chat at https://gitter.im/graalvm/graaljs

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

The goals of GraalVM JavaScript are:

Getting Started

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.

Documentation

Extensive documentation is available in docs, 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 2019 specification.
New features, e.g. for the upcoming 2020 edition, are added frequently.
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 you will need to re-compile from source with GraalVM JavaScript if you want to run binaries that have been compiled for Node.js based on V8, or any other compatible engine.

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

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.

Authors

The main authors of GraalVM JavaScript in order of joining the project are:

Andreas Woess, Christian Wirth, Danilo Ansaloni, Daniele Bonetta, Jan Stola, Jakub Podlesak, Tomas Mysik, Jirka Marsik, Josef Haider

Additionally:

Thomas Würthinger, Christian Humer

Collaborations with:

and others.

Licence

GraalVM JavaScript is available under the following license:

To the top