Skip to content

Commit 3d2b94b

Browse files
committed
[GR-54802] Add required release updates to docs for GraalVM JDK 23 release.
PullRequest: graal/18562
2 parents 3bf7dad + 44c4761 commit 3d2b94b

File tree

3 files changed

+39
-50
lines changed

3 files changed

+39
-50
lines changed

docs/reference-manual/embedding/embed-languages.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: docs
33
toc_group: embedding
4-
link_title: Embedding Reference
4+
link_title: Embedding Languages
55
permalink: /reference-manual/embed-languages/
66
---
77

@@ -25,56 +25,53 @@ permalink: /reference-manual/embed-languages/
2525
* [Setting the Heap Size](#setting-the-heap-size)
2626
* [Compatibility with JSR-223 ScriptEngine](#compatibility-with-jsr-223-scriptengine)
2727

28-
The GraalVM Polyglot API lets you embed and run code from guest languages in JVM-based host applications.
28+
The [GraalVM Polyglot API](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/package-summary.html) lets you embed and run code from guest languages in Java host applications.
2929

30-
Throughout this section, you will learn how to create a host application in Java that runs on GraalVM and directly calls a guest language.
30+
Throughout this section, you will learn how to create a host application in Java that runs on GraalVM and directly calls a guest language.
3131
You can use the tabs beneath each code example to choose between JavaScript, R, Ruby, and Python.
3232

33-
> Note: The usage description for polyglot embeddings was revised with the GraalVM for JDK 22 (24.0.0) release. If you are still using a GraalVM version older than 23.1.x, ensure the correct version of the documentation is displayed. More information on the change can be found in the [release notes](https://www.graalvm.org/release-notes/JDK_21/#graalvm-for-jdk-21).
33+
> Note: The usage description for polyglot embeddings was revised with GraalVM for JDK 21 and Polyglot API version 23.1.0. If you are still using Polyglot API version older than 23.1.0, ensure the correct version of the documentation is displayed. More information on the change can be found in the [release notes](https://www.graalvm.org/release-notes/JDK_21/#graalvm-for-jdk-21).
3434
3535
## Dependency Setup
3636

37-
Since GraalVM Polyglot API version 23.1.0, all necessary artifacts can be downloaded directly from Maven Central.
38-
All artifacts relevant to embedders can be found in the Maven dependency group [`org.graalvm.polyglot`](https://central.sonatype.com/namespace/org.graalvm.polyglot).
37+
Since Polyglot API version 23.1.0, all necessary artifacts can be downloaded directly from Maven Central.
38+
Artifacts relevant to embedders can be found in the Maven dependency group [`org.graalvm.polyglot`](https://central.sonatype.com/namespace/org.graalvm.polyglot).
3939
See the [polyglot embedding demonstration](https://github.com/graalvm/polyglot-embedding-demo) on GitHub for a complete runnable example.
4040

4141
Here is an example Maven dependency setup that you can put into your project:
42-
4342
```xml
4443
<dependency>
4544
<groupId>org.graalvm.polyglot</groupId>
4645
<artifactId>polyglot</artifactId>
4746
<version>${graalvm.polyglot.version}</version>
4847
</dependency>
4948
<dependency>
50-
<groupId>org.graalvm.polyglot</groupId>
51-
<!-- Select language: js, ruby, python, java, llvm, wasm, languages-->
49+
<groupId>org.graalvm.polyglot</groupId>
50+
<!-- Select a language: js, ruby, python, java, llvm, wasm, languages-->
5251
<artifactId>js</artifactId>
5352
<version>${graalvm.polyglot.version}</version>
5453
<type>pom</type>
5554
</dependency>
56-
<!-- add additional languages if needed -->
55+
<!-- Add additional languages if needed -->
5756
<dependency>
5857
<groupId>org.graalvm.polyglot</groupId>
59-
<!-- Select tools: profiler, inspect, coverage, dap, tools -->
60-
<artifactId>tools</artifactId>
58+
<!-- Select a tool: profiler, inspect, coverage, dap, tools -->
59+
<artifactId>profiler</artifactId>
6160
<version>${graalvm.polyglot.version}</version>
6261
<type>pom</type>
6362
</dependency>
64-
<!-- add specific tools if needed -->
6563
```
6664

65+
> The `pom` type is a requirement for language or tool dependencies.
66+
6767
Language and tool dependencies use the [GraalVM Free Terms and Conditions (GFTC)](https://www.oracle.com/downloads/licenses/graal-free-license.html) license.
6868
To use community-licensed versions instead, add the `-community` suffix to each artifact (for example, `js-community`).
6969
To access [polyglot isolate](#polyglot-isolates) artifacts, use the `-isolate` suffix instead (for example, `js-isolate`).
7070

71-
The artifacts `polyglot` and `tools` include all available languages and tools as dependencies.
71+
The artifacts `languages` and `tools` include all available languages and tools as dependencies.
7272
This artifact might grow or shrink between major releases. We recommend selecting only the needed language(s) for a production deployment.
7373

74-
> The `pom` type is a requirement for language or tool dependencies.
75-
76-
Additionally, your _module-info.java_ file should require `org.graalvm.polyglot` when using Java modules.
77-
74+
Additionally, your _module-info.java_ file should require `org.graalvm.polyglot` when using Java modules:
7875
```java
7976
module com.mycompany.app {
8077
requires org.graalvm.polyglot;
@@ -89,14 +86,14 @@ Be aware that using `org.graalvm.polyglot` from the class path instead will enab
8986
If the application is not yet modularized, hybrid use of the class path and module path is possible.
9087
For example:
9188
```
92-
$JAVA_HOME/bin/java -classpath=lib --module-path=lib/polyglot --add-modules=org.graalvm.polyglot ...
89+
$java -classpath=lib --module-path=lib/polyglot --add-modules=org.graalvm.polyglot ...
9390
```
9491
In this example, `lib/polyglot` directory should contain all polyglot and language JAR files.
9592
To access polyglot classes from the class path, you must also specify the `--add-modules=org.graalvm.polyglot` JVM option.
96-
If you are using [native-image](https://www.graalvm.org/latest/reference-manual/embed-languages/#build-native-executables-from-polyglot-applications), polyglot modules on the class path will be automatically upgraded to the module path.
93+
If you are using [GraalVM Native Image](#build-native-executables-from-polyglot-applications), polyglot modules on the class path will be automatically upgraded to the module path.
9794

98-
While we do support creating single uber JAR files from polyglot libraries, for example using the Maven Assembly plugin, we do not recommend it.
99-
Also note that uber JAR files are not supported in combination with creating native-images.
95+
While we do support creating single uber JAR files from polyglot libraries, for example, using the Maven Assembly plugin, but we do not recommend it.
96+
Also note that uber JAR files are not supported when creating native binaries with GraalVM Native Image.
10097

10198
## Compile and Run a Polyglot Application
10299

@@ -116,12 +113,12 @@ Complete the steps in this section to create a sample polyglot application that
116113

117114
4. Update the Maven [pom.xml](https://github.com/graalvm/polyglot-embedding-demo/blob/main/pom.xml) dependency configuration to include the languages to run as described in the [previous section](#dependency-setup).
118115

119-
5. [Download and setup GraalVM](../../getting-started/get-started.md) by setting the value of the `JAVA_HOME` environment variable to the location of a GraalVM JDK.
116+
5. [Download and install GraalVM](../../getting-started/get-started.md) by setting the value of the `JAVA_HOME` environment variable to the location of a GraalVM JDK.
120117

121118
6. Run `mvn package exec:exec` to build and execute the sample code.
122119

123120
You now have a polyglot application that consists of a Java host application and guest language code, running on GraalVM.
124-
You can use this application with other code examples to demonstrate more advanced capabilities of the Polyglot API.
121+
You can use this application with other code examples to demonstrate more advanced capabilities of the GraalVM Polyglot API.
125122

126123
## Define Guest Language Functions as Java Values
127124

docs/reference-manual/languages.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ permalink: /reference-manual/languages/
1010
GraalVM provides runtimes for JavaScript, Ruby, Python, and a number of other popular languages.
1111
GraalVM's polyglot capabilities make it possible to mix multiple programming languages in a single application while eliminating any foreign language call costs.
1212

13-
If you are mostly interested in GraalVM's support for a specific language, here you can find the most extensive documentation:
14-
13+
If you are mostly interested in a specific language runtime on GraalVM, see the following:
1514
* [Java on Truffle](java-on-truffle/README.md)
16-
* [JavaScript and Node.js](https://github.com/oracle/graaljs/blob/master/docs/user/README.md)
15+
* [GraalJS](https://github.com/oracle/graaljs/blob/master/docs/user/README.md)
16+
* [GraalPy](https://github.com/oracle/graalpython/blob/master/docs/user/README.md)
17+
* [GraalWasm](wasm/README.md)
1718
* [LLVM Languages](llvm/README.md)
18-
* [Python](https://github.com/oracle/graalpython/blob/master/docs/user/README.md)
19-
* [R](https://github.com/oracle/fastr/blob/master/documentation/user/README.md)
20-
* [Ruby](https://github.com/oracle/truffleruby/blob/master/doc/user/README.md)
21-
* [WebAssembly](wasm/README.md)
19+
* [TruffleRuby](https://github.com/oracle/truffleruby/blob/master/doc/user/README.md)
20+
* [FastR](https://github.com/oracle/fastr/blob/master/documentation/user/README.md)

docs/reference-manual/reference-manuals.md

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,21 @@ permalink: /reference-manual/
66
redirect_from: /docs/reference-manual/
77
---
88

9-
# GraalVM Reference Manuals
9+
# Reference Manuals
1010

1111
Here you will find the in-depth documentation for technologies offered by GraalVM.
1212
These manuals are aimed at software engineers and developers who already work with GraalVM, or are considering it as an environment for their workloads.
1313

14-
## Technologies
14+
* Learn more about [GraalVM as a Java Virtual Machine](java/README.md) and its optimizing just-in-time compiler, [Graal Compiler](java/compiler.md).
15+
* Developers interested in embedding other languages into Java, proceed to [Embedding Languages](embedding/embed-languages.md).
16+
* Developers interested in building interpreters for programming languages which then run on GraalVM, continue to the [Truffle language implementation framework documentation](../../truffle/docs/README.md).
17+
* To learn more about security considerations in GraalVM, check the [Security Guide](security/security-guide.md).
1518

16-
[Native Image](native-image/README.md) - learn in detail about Native Image: GraalVM's innovative technology that can ahead-of-time compile Java code to a self-contained native executable.
17-
18-
[Java on Truffle](java-on-truffle/README.md) - learn how to run Java via a Java bytecode interpreter, implemented with the [Truffle framework](../../truffle/docs/README.md).
19-
20-
[Polyglot Programming](polyglot-programming.md) - learn how to write polyglot applications and allow languages to directly interoperate with each other in the same memory space.
21-
22-
[Embedding Languages](embedding/embed-languages.md) - learn how to embed polyglot applications in Java host applications or native images.
23-
24-
## Specific Languages
25-
26-
If you are mostly interested in the GraalVM support for a specific language, here you can find the most extensive documentation:
27-
28-
* [JavaScript and Node.js](js/README.md)
19+
If you are mostly interested in a specific language runtime on GraalVM, see the following:
20+
* [Java on Truffle](java-on-truffle/README.md)
21+
* [GraalJS](https://github.com/oracle/graaljs/blob/master/docs/user/README.md)
22+
* [GraalPy](https://github.com/oracle/graalpython/blob/master/docs/user/README.md)
23+
* [GraalWasm](wasm/README.md)
2924
* [LLVM Languages](llvm/README.md)
30-
* [Python](python/README.md)
31-
* [R](r/README.md)
32-
* [Ruby](ruby/README.md)
33-
* [WebAssembly](wasm/README.md)
25+
* [TruffleRuby](https://github.com/oracle/truffleruby/blob/master/doc/user/README.md)
26+
* [FastR](https://github.com/oracle/fastr/blob/master/documentation/user/README.md)

0 commit comments

Comments
 (0)