graal README

The project's README from github.com/oracle/graal. As one markdown file: README.md.

GraalVM

GraalVM downloads GraalVM docs GraalVM on Slack GraalVM Gate License GraalVM on LinkedIn GraalVM on X GraalVM on Bluesky GraalVM on Medium GraalVM on YouTube

GraalVM compiles applications ahead of time into standalone binaries that start instantly, provide peak performance with no warmup, and use fewer resources. You can use GraalVM just like any other Java Development Kit in your IDE.

The project website at https://www.graalvm.org/ describes how to get started, how to stay connected, and how to contribute.

Documentation

Please refer to the GraalVM website for documentation. You can find most of the documentation sources in the docs/ directory in the same hierarchy as displayed on the website. Additional documentation including developer instructions for individual components can be found in corresponding docs/ sub-directories. The documentation for the Truffle framework, for example, is in truffle/docs/. This also applies to languages, tools, and other components maintained in related repositories. Instructions for building GraalVM from source are in vm/README.md.

Get Support

Repository Structure

This source repository is the main repository for GraalVM and includes the following components:

Directory Description
.github/ Configuration files for GitHub issues, workflows, ….
ci/ Configuration files for internal CI/CD infrastructure.
ci_includes/ Configuration include files for internal CI/CD infrastructure.
compiler/ Graal compiler, a modern, versatile compiler written in Java.
espresso-compiler-stub/ A dummy GraalJVMCICompiler implementation for Espresso.
espresso-shared/ Espresso shared code for runtime class loading.
espresso/ Espresso, a meta-circular Java bytecode interpreter for the GraalVM.
regex/ TRegex, a regular expression engine for other GraalVM languages.
sdk/ GraalVM SDK, long-term supported APIs of GraalVM.
substratevm/ Framework for ahead-of-time (AOT) compilation with Native Image.
sulong/ Sulong, an engine for running LLVM bitcode on GraalVM.
tools/ Tools for Graal Languages implemented with the instrumentation framework.
truffle/ Language implementation framework for creating languages and tools.
visualizer/ Ideal Graph Visualizer (IGV), a tool for analyzing Graal compiler graphs.
vm/ Components for building GraalVM distributions.
wasm/ GraalWasm, an engine for running WebAssembly programs on GraalVM.
web-image/ Web Image, an experimental WebAssembly backend for Native Image.

GraalVM provides additional languages, tools, and other components developed in related repositories. These are:

Name Description
GraalJS Implementation of JavaScript and Node.js.
GraalPy Implementation of the Python language.
graalvm-reachability-metadata Reachability metadata for open-source libraries.
Native Build Tools Build tool plugins for GraalVM Native Image.
setup-graalvm GitHub Action for GraalVM.
SimpleLanguage A simple example language built with the Truffle framework.
SimpleTool A simple example tool built with the Truffle framework.

Examples and Tutorials

Explore practical examples, deep-dive workshops, and language-specific demos for working with GraalVM.

Name Description
GraalVM Demos Example applications highlighting GraalVM key features and best practices.
GraalVM Workshops and Tutorials Workshops and tutorials to help you learn and apply GraalVM tools and capabilities.
Graal Languages - Demos and Guides Demo applications and guides for GraalJS, GraalPy, GraalWasm, and other Graal Languages.

License

GraalVM Community Edition is open source and distributed under version 2 of the GNU General Public License with the “Classpath” Exception, which are the same terms as for Java. The licenses of the individual GraalVM components are generally derivative of the license of a particular language (see the table below).

Component(s) License
Espresso, Ideal Graph Visualizer, Web Image GPL 2
GraalVM Compiler, SubstrateVM, Tools, VM GPL 2 with Classpath Exception
GraalVM SDK, GraalWasm, Truffle Framework, TRegex Universal Permissive License
Sulong 3-clause BSD

graal (oracle/graal)

Searching Database…

21.7K ·GitHub
这是什么?GraalVM 是一个高性能 JDK,它最大的亮点是提前(AOT)编译:能把应用编译成独立的原生可执行文件,启动飞快,无需预热,占用的资源也更少。
它是接入我项目的编译器,还是一个完整的 JDK?它是一个完整的 JDK——你在 IDE 里使用 GraalVM,就像使用其他任何 JDK 一样。这个仓库存放的是核心组件:Graal 编译器、SubstrateVM(Native Image AOT 编译背后的框架)以及 Truffle 语言框架。
我怎么把它跑起来?从 graalvm.org 下载 Linux、macOS 或 Windows 版本,然后在 IDE 里把它选为 JDK。CI 方面有 setup-graalvm 这个 GitHub Action,你也可以从源码自行构建。
要把我现有的 Java 应用编译成原生可执行文件,需要什么?需要 Native Build Tools——这是官方提供的面向 Native Image 的 Maven 和 Gradle 插件。另一个配套仓库还发布了可达性元数据(reachability metadata),让常用的开源库也能在 AOT 编译下正常工作。
它是完全开源的吗,还是 Oracle 许可有什么坑?GraalVM 社区版以 GPLv2 加 Classpath Exception 的方式开源——和 Java 本身的条款一样。各组件有所不同:Truffle、GraalWasm、SDK 和 TRegex 采用 Universal Permissive License,Sulong 则是 3-clause BSD。
为什么要提前编译,而不是直接在 JVM 上运行?原生可执行文件启动飞快,不需要预热就能达到峰值性能,占用的计算资源也更少——凡是看重启动时间和内存占用的场景都很适用。
Truffle 是什么?是这个仓库里用于创建编程语言和工具的框架。GraalJS、GraalPy、Sulong 和 GraalWasm 都基于它构建,相关仓库中的 SimpleLanguage 则是一个用来学习的最小示例语言。
在哪里能找到示例和教程?GraalVM Demos 仓库里有突出关键特性和最佳实践的示例应用,还有工作坊、教程,以及针对 GraalJS、GraalPy 和 GraalWasm 的语言专属演示和指南。
编译器工作时我能看到它的内部情况吗?可以——这个仓库自带 Ideal Graph Visualizer(IGV),用来分析 Graal 编译器的图结构,还有基于插桩框架为 Graal 语言构建的各种工具。
Creator
oracle
Size
523.2 MB
Stars
21.7K
Age
10y
Commits · 90 Days