File tree Expand file tree Collapse file tree 4 files changed +14
-20
lines changed
src/main/java/com/example Expand file tree Collapse file tree 4 files changed +14
-20
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ This demo illustrates how to use the new experimental WebAssembly backend for Gr
7
7
This demo requires:
8
8
9
9
1 . An [ Early Access Build] ( https://github.com/graalvm/oracle-graalvm-ea-builds ) of Oracle GraalVM for JDK 25 or later.
10
- For example, using SDKMAN!: ` sdk install java 25.ea.18 -graal `
10
+ For example, using SDKMAN!: ` sdk install java 25.ea.25 -graal `
11
11
2 . The [ Binaryen toolchain] ( https://github.com/WebAssembly/binaryen ) in version 119 or later and on the system path.
12
12
For example, using Homebrew: ` brew install binaryen `
13
13
Original file line number Diff line number Diff line change 56
56
<arg >-parameters</arg >
57
57
<arg >--add-exports=jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED</arg >
58
58
<arg >--add-modules=jdk.jdeps</arg >
59
+ <!--
60
+ The JS interop API is experimental and currently
61
+ hidden in the impl subpackage, which has to be
62
+ exported explicitly
63
+ -->
64
+ <arg >--add-exports=org.graalvm.nativeimage/org.graalvm.nativeimage.impl.js=ALL-UNNAMED</arg >
59
65
</compilerArgs >
60
66
</configuration >
61
67
</plugin >
62
68
</plugins >
63
69
</build >
64
70
65
- <dependencies >
66
- <dependency >
67
- <artifactId >someArtifactId</artifactId >
68
- <groupId >someGroupId</groupId >
69
- <version >1.0</version >
70
- <scope >system</scope >
71
- <systemPath >
72
- ${java.home} /lib/svm/tools/svm-wasm/builder/svm-wasm-api.jar
73
- </systemPath >
74
- </dependency >
75
- </dependencies >
76
-
77
71
<profiles >
78
72
<profile >
79
73
<id >native</id >
Original file line number Diff line number Diff line change 13
13
import javax .tools .Diagnostic ;
14
14
import javax .tools .JavaFileObject ;
15
15
16
- import org .graalvm .webimage . api .JS ;
17
- import org .graalvm .webimage . api .JSNumber ;
18
- import org .graalvm .webimage . api .JSObject ;
16
+ import org .graalvm .nativeimage . impl . js .JS ;
17
+ import org .graalvm .nativeimage . impl . js .JSNumber ;
18
+ import org .graalvm .nativeimage . impl . js .JSObject ;
19
19
20
20
public class JavacMain {
21
21
public static void main (String [] args ) throws IOException {
Original file line number Diff line number Diff line change 20
20
import com .example .JavacCompilerWrapper ;
21
21
import com .example .JavacCompilerWrapper .FileContent ;
22
22
import com .example .preload .PreLoadedFiles ;
23
- import org .graalvm .webimage . api .JS ;
24
- import org .graalvm .webimage . api .JSBoolean ;
25
- import org .graalvm .webimage . api .JSObject ;
26
- import org .graalvm .webimage . api .JSString ;
23
+ import org .graalvm .nativeimage . impl . js .JS ;
24
+ import org .graalvm .nativeimage . impl . js .JSBoolean ;
25
+ import org .graalvm .nativeimage . impl . js .JSObject ;
26
+ import org .graalvm .nativeimage . impl . js .JSString ;
27
27
28
28
import com .sun .tools .javap .JavapTask ;
29
29
You can’t perform that action at this time.
0 commit comments