Skip to content

Commit dda1813

Browse files
authored
Merge pull request #11 from chumer/chumer/update-version2
Update GraalVM Version. Fix WASM incompatibility.
2 parents aeb5875 + caa96e2 commit dda1813

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- uses: graalvm/setup-graalvm@v1
1414
with:
15-
java-version: '21.0.2'
15+
java-version: '22.0.1'
1616
distribution: 'graalvm'
1717
github-token: ${{ secrets.GITHUB_TOKEN }}
1818
native-image-job-reports: 'true'
@@ -31,7 +31,7 @@ jobs:
3131
- uses: actions/checkout@v4
3232
- uses: graalvm/setup-graalvm@v1
3333
with:
34-
java-version: '21.0.2'
34+
java-version: '22.0.1'
3535
distribution: 'graalvm'
3636
github-token: ${{ secrets.GITHUB_TOKEN }}
3737
native-image-job-reports: 'true'

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Polyglot Embedding Demo with GraalVM for JDK 21
2-
Demonstration repository showing polyglot embedding with GraalVM JDK 21 using Maven and Gradle.
1+
# Polyglot Embedding Demo with GraalVM
2+
Demonstration repository showing polyglot embedding with GraalVM using Maven and Gradle.
33
It contains a simple Main and Test class to bootstrap a polyglot embedding project.
44

5-
For demonstration showing polyglot native embedding with GraalVM JDK 21 using Maven, see
5+
For demonstration showing polyglot native embedding with GraalVM using Maven, see
66
the [Native embedding Maven project](native-embedding/README.md) located in the `native-embedding` subdirectory.
77

88
For more details on polyglot embedding please see the docs:

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import java.nio.file.*
33
plugins {
44
id("java")
55
id("application")
6-
id("org.graalvm.buildtools.native") version "0.9.28"
6+
id("org.graalvm.buildtools.native") version "0.10.2"
77
}
88

99
java {
@@ -20,7 +20,7 @@ group = "org.example"
2020
version = "1.0-SNAPSHOT"
2121
description = "embedding"
2222

23-
var graalVMVersion: String = "23.1.2";
23+
var graalVMVersion: String = "24.0.1";
2424
dependencies {
2525
implementation("org.graalvm.polyglot:polyglot:$graalVMVersion")
2626
implementation("org.graalvm.polyglot:js:$graalVMVersion")

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<properties>
2626
<!-- Select the GraalVM version to use. -->
27-
<graalvm.version>23.1.2</graalvm.version>
27+
<graalvm.version>24.0.1</graalvm.version>
2828
</properties>
2929

3030
<dependencies>
@@ -156,7 +156,7 @@
156156
<plugin>
157157
<groupId>org.graalvm.buildtools</groupId>
158158
<artifactId>native-maven-plugin</artifactId>
159-
<version>0.9.28</version>
159+
<version>0.10.2</version>
160160
<extensions>true</extensions>
161161
<executions>
162162
<execution>

src/main/java/org/example/embedding/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static void main(String[] args) throws IOException {
7171
break;
7272
case "wasm":
7373
// with wasm we compute factorial
74-
context.eval(Source.newBuilder("wasm", Main.class.getResource("factorial.wasm")).build());
74+
context.eval(Source.newBuilder("wasm", Main.class.getResource("factorial.wasm")).name("main").build());
7575
Value factorial = context.getBindings("wasm").getMember("main").getMember("fac");
7676
System.out.println("wasm: factorial(20) = " + factorial.execute(20L));
7777
break;

0 commit comments

Comments
 (0)