Skip to content

Commit 8d88e31

Browse files
committed
Update GraalVM SDK README.md
1 parent f105a80 commit 8d88e31

File tree

1 file changed

+50
-17
lines changed

1 file changed

+50
-17
lines changed

sdk/README.md

+50-17
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,67 @@
22

33
The GraalVM SDK is a collection of APIs for the components of GraalVM.
44

5-
* The [`org.graalvm.polyglot`](http://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/package-summary.html) module contains APIs to embed Graal languages in Java host applications.
6-
* The [`org.graalvm.collections`](http://www.graalvm.org/sdk/javadoc/org/graalvm/collections/package-summary.html) module contains memory efficient common collection data structures used across Graal projects.
7-
* The [`org.graalvm.options`](http://www.graalvm.org/sdk/javadoc/org/graalvm/options/package-summary.html) module contains reusable classes for options.
5+
* [`org.graalvm.nativeimage`](https://www.graalvm.org/sdk/javadoc/org/graalvm/nativeimage/package-summary.html): The Native Image public API for advanced use cases.
6+
* [`org.graalvm.polyglot`](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/package-summary.html): A library that allows to embed polyglot language implementations in Java.
7+
* [`org.graalvm.word`](https://www.graalvm.org/sdk/javadoc/org/graalvm/word/package-summary.html): A low-level library for machine-word-sized values in Java.
8+
* [`org.graalvm.collection`](https://www.graalvm.org/sdk/javadoc/org/graalvm/collections/package-summary.htmlyes): A collections library for GraalVM components.
89

910
## Getting Started
1011

11-
1. Download GraalVM from [Oracle Technology Network](https://www.oracle.com/downloads/graalvm-downloads.html).
12-
2. Use any of the Java executables in `./bin` or import GraalVM as JDK in your favorite IDE.
13-
3. Use GraalVM SDK, the jar is put on the class path for you automatically.
12+
To get started, download and install GraalVM for your operating system as described in the [installation guide](https://www.graalvm.org/latest/docs/getting-started/).
13+
The GraalVM SDK JAR is put on the class path automatically.
14+
You can use GraalVM just like any other JDK in your IDE.
1415

1516
The GraalVM SDK bits are also uploaded to Maven central.
16-
You can use it from your `pom.xml` file as:
17+
Add these module dependencies to your Maven project configuration file:
1718

1819
```xml
19-
<dependencies>
20-
<dependency>
21-
<groupId>org.graalvm</groupId>
22-
<artifactId>graal-sdk</artifactId>
23-
<version>0.30</version>
24-
</dependency>
25-
</dependencies>
20+
<dependency>
21+
<groupId>org.graalvm.sdk</groupId>
22+
<artifactId>nativeimage</artifactId>
23+
<version>${graalvm.version}</version>
24+
</dependency>
25+
<dependency>
26+
<groupId>org.graalvm.sdk</groupId>
27+
<artifactId>word</artifactId>
28+
<version>${graalvm.version}</version>
29+
</dependency>
30+
<dependency>
31+
<groupId>org.graalvm.sdk</groupId>
32+
<artifactId>collections</artifactId>
33+
<version>${graalvm.version}</version>
34+
</dependency>
2635
```
2736

28-
Please note that GraalVM SDK requires GraalVM to run.
37+
The `org.graalvm.polyglot` module is not contained by default in the GraalVM JDK.
38+
To enable a language embedding in Java, specify the language as a dependency.
39+
If you need the Truffle tools for your polyglot application, enable them through a dependency too.
40+
Below is an example of the Maven configuration:
2941

30-
## Tutorials
42+
```xml
43+
<dependency>
44+
<groupId>org.graalvm.polyglot</groupId>
45+
<artifactId>polyglot</artifactId>
46+
<version>23.1.2</version>
47+
</dependency>
48+
<dependency>
49+
<groupId>org.graalvm.polyglot</groupId>
50+
<artifactId>js|python|ruby|wasm|llvm|java</artifactId>
51+
<version>23.1.2</version>
52+
<type>pom</type>
53+
</dependency>
54+
<dependency>
55+
<groupId>org.graalvm.polyglot</groupId>
56+
<artifactId>tools</artifactId>
57+
<version>23.1.2</version>
58+
<type>pom</type>
59+
</dependency>
60+
```
61+
62+
## Learn More
3163

32-
* [Tutorial](https://www.graalvm.org/docs/reference-manual/embed/) on using the polyglot API to embed Graal languages in Java host applications.
64+
* [Embedding Languages documentation](https://www.graalvm.org/latest/reference-manual/embed-languages/) to learn how to use the Polyglot API to embed GraalVM languages in a Java host application.
65+
* [Polyglot Embedding Demonstration on GitHub](https://github.com/graalvm/polyglot-embedding-demo) to find a complete runnable Maven and Gradle examples.
3366

3467
## Changes
3568

0 commit comments

Comments
 (0)