File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 <maven .compiler.source>11</maven .compiler.source>
1616 <maven .compiler.target>11</maven .compiler.target>
1717
18- <chicory .version>1.2 .1</chicory .version>
18+ <chicory .version>1.6 .1</chicory .version>
1919 <junit .version>5.12.1</junit .version>
2020 </properties >
2121
4747 </dependency >
4848 <dependency >
4949 <groupId >com.dylibso.chicory</groupId >
50- <artifactId >host-module- annotations-experimental </artifactId >
50+ <artifactId >annotations</artifactId >
5151 <scope >provided</scope >
5252 </dependency >
5353 <dependency >
8181 <annotationProcessorPaths >
8282 <path >
8383 <groupId >com.dylibso.chicory</groupId >
84- <artifactId >host-module- processor-experimental </artifactId >
84+ <artifactId >annotations- processor</artifactId >
8585 <version >${chicory.version} </version >
8686 </path >
8787 </annotationProcessorPaths >
112112 </plugin >
113113 <plugin >
114114 <groupId >com.dylibso.chicory</groupId >
115- <artifactId >aot- maven-plugin-experimental </artifactId >
115+ <artifactId >chicory-compiler- maven-plugin</artifactId >
116116 <version >${chicory.version} </version >
117117 <executions >
118118 <execution >
119119 <id >prism</id >
120120 <goals >
121- <goal >wasm-aot-gen </goal >
121+ <goal >compile </goal >
122122 </goals >
123123 <configuration >
124- <name >org.prism.Prism </name >
124+ <name >org.prism.PrismParser </name >
125125 <wasmFile >src/main/resources/prism.wasm</wasmFile >
126126 </configuration >
127127 </execution >
Original file line number Diff line number Diff line change 11package org .prism ;
22
3+ import com .dylibso .chicory .annotations .WasmModuleInterface ;
34import com .dylibso .chicory .runtime .ByteArrayMemory ;
4- import com .dylibso .chicory .experimental .hostmodule .annotations .WasmModuleInterface ;
55import com .dylibso .chicory .runtime .ImportValues ;
66import com .dylibso .chicory .runtime .Instance ;
77import com .dylibso .chicory .wasi .WasiOptions ;
88import com .dylibso .chicory .wasi .WasiPreview1 ;
9+ import com .dylibso .chicory .wasm .WasmModule ;
910import com .dylibso .chicory .wasm .types .MemoryLimits ;
1011
1112import java .nio .charset .StandardCharsets ;
@@ -21,9 +22,11 @@ public Prism() {
2122 }
2223 public Prism (WasiOptions wasiOpts ) {
2324 wasi = WasiPreview1 .builder ().withOptions (wasiOpts ).build ();
24- instance = Instance .builder (PrismModule .load ())
25+ WasmModule module = PrismParser .load ();
26+ PrismParser parser = new PrismParser ();
27+ instance = Instance .builder (module )
2528 .withMemoryFactory (limits -> new ByteArrayMemory (new MemoryLimits (10 , MemoryLimits .MAX_PAGES )))
26- .withMachineFactory (PrismModule :: create )
29+ .withMachineFactory (parser . machineFactory () )
2730 .withImportValues (ImportValues .builder ().addFunction (wasi .toHostFunctions ()).build ())
2831 .build ();
2932 exports = new Prism_ModuleExports (instance );
You can’t perform that action at this time.
0 commit comments