Skip to content

Commit f332d89

Browse files
committed
[GR-50397] [GR-50882] Update Native Image documentation.
PullRequest: graal/16260
2 parents 184ad00 + 7677eb8 commit f332d89

File tree

9 files changed

+261
-307
lines changed

9 files changed

+261
-307
lines changed

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ The GraalVM Polyglot API lets you embed and run code from guest languages in JVM
3030
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 21 (23.1.0) release. If you are still using an older GraalVM version, 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/).
33+
> Note: The usage description for polyglot embeddings was revised with the GraalVM for JDK 21 (23.1.1) release. If you are still using an older GraalVM version, 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/).
3434
3535

3636
## Dependency Setup
3737

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

@@ -45,32 +45,34 @@ Here is an example Maven dependency setup that you can put into your project:
4545
<dependency>
4646
<groupId>org.graalvm.polyglot</groupId>
4747
<artifactId>polyglot</artifactId>
48-
<version>23.1.0</version>
48+
<version>23.1.1</version>
4949
</dependency>
5050
<dependency>
5151
<groupId>org.graalvm.polyglot</groupId>
5252
<!-- Select language: js, ruby, python, java, llvm, wasm, languages-->
5353
<artifactId>js</artifactId>
54-
<version>23.1.0</version>
54+
<version>23.1.1</version>
5555
<type>pom</type>
5656
</dependency>
5757
<!-- add additional languages if needed -->
5858
<dependency>
5959
<groupId>org.graalvm.polyglot</groupId>
6060
<!-- Select tools: profiler, inspect, coverage, dap, tools -->
6161
<artifactId>tools</artifactId>
62-
<version>23.1.0</version>
62+
<version>23.1.1</version>
6363
<type>pom</type>
6464
</dependency>
65-
<!-- add additional tools if needed -->
65+
<!-- add specific tools if needed -->
6666
```
6767

6868
Language and tool dependencies use the [GraalVM Free Terms and Conditions (GFTC)](https://www.oracle.com/downloads/licenses/graal-free-license.html) license
6969
To use community-licensed versions instead, add the `-community` suffix to each artifact (e.g., `js-community`).
7070
To access [polyglot isolate](#polyglot-isolates) artifacts, use the `-isolate` suffix instead (e.g. `js-isolate`).
7171

72-
The artifacts `languages` and `tools` include all available languages and tools as dependencies.
73-
This artifact might grow or shrink between major releases. We recommend selecting only the needed languages for a production deployment.
72+
The artifacts `polyglot` and `tools` include all available languages and tools as dependencies.
73+
This artifact might grow or shrink between major releases. We recommend selecting only the needed language(s) for a production deployment.
74+
75+
> The `pom` type is a requirement for language or tool dependencies.
7476
7577
Additionally, your _module-info.java_ file should require `org.graalvm.polyglot` when using Java modules.
7678

@@ -727,7 +729,7 @@ public class PolyglotIsolate {
727729
.allowHostAccess(HostAccess.SCOPED)
728730
.option("engine.SpawnIsolate", "true").build()) {
729731
730-
Value function = context.eval("js", "x => x+1")
732+
Value function = context.eval("js", "x => x+1");
731733
assert function.canExecute();
732734
int x = function.execute(41).asInt();
733735
assert x == 42;

docs/reference-manual/java-on-truffle/HotSwap.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -240,22 +240,22 @@ Download, unzip and open the project in your IDE.
240240
Before you proceed, make sure that you have Java on Truffle [installed](README.md#install-java-on-truffle) and set the GraalVM as the project SDK.
241241

242242
1. In your IDE navigate to the root `build.gradle` within the sample project. Add:
243-
```groovy
244-
run.jvmArgs+="-truffle"
245-
```
243+
```
244+
run.jvmArgs+="-truffle"
245+
```
246246
247247
2. Also add maven local repository where we previously published the enhanced Micronaut framework. For example:
248-
```groovy
249-
repositories {
250-
mavenLocal()
251-
...
252-
}
253-
```
248+
```
249+
repositories {
250+
mavenLocal()
251+
...
252+
}
253+
```
254254
255255
3. In `gradle.properties` update the Micronaut version that you published. For example:
256-
```groovy
257-
micronautVersion=2.5.8-SNAPSHOT
258-
```
256+
```
257+
micronautVersion=2.5.8-SNAPSHOT
258+
```
259259
Now you are all setup.
260260
261261
4. Execute`assemble` task and create a run configuration using the defined `run` gradle task.

0 commit comments

Comments
 (0)