@@ -47,6 +47,15 @@ Add the following set of dependencies to the `<dependencies>` section of your pr
4747<!-- </dependencies> -->
4848```
4949
50+ Be sure to add a ` graal.languages.version ` property with the version of GraalWasm you would like to use:
51+
52+ ``` xml
53+ <properties >
54+ <graal .languages.version>24.2.2</graal .languages.version>
55+ <!-- more properties -->
56+ </properties >
57+ ```
58+
5059## 2. Set Up Rust Code
5160
5261Next, create a Rust project, write Rust code, and compile it into a WebAssembly module.
@@ -205,11 +214,31 @@ public class App {
205214
206215## 4. Build and Test the Application
207216
217+ If you want to run the application using the ` exec-maven-plugin ` , add the following as a default configuration:
218+
219+ ``` xml
220+ <plugin >
221+ <groupId >org.codehaus.mojo</groupId >
222+ <artifactId >exec-maven-plugin</artifactId >
223+ <configuration >
224+ <executable >java</executable >
225+ <arguments >
226+ <argument >-classpath</argument >
227+ <classpath />
228+ <argument >--enable-native-access=ALL-UNNAMED</argument >
229+ <argument >--sun-misc-unsafe-memory-access=allow</argument >
230+ <argument >com.example.App</argument >
231+ </arguments >
232+ </configuration >
233+ <!-- Execution for build-rust (see 2.3.) -->
234+ </plugin >
235+ ```
236+
208237Compile and run the Java application with Maven:
209238
210239``` shell
211- ./mvnw package
212- ./mvnw exec:exec
240+ mvn package
241+ mvn exec:exec
213242```
214243
215244The expected output should look like this:
@@ -259,7 +288,7 @@ Afterward, add a new profile using the `native-maven-plugin` to your _pom.xml_:
259288To build the native executable, run:
260289
261290``` bash
262- ./mvnw -Pnative package
291+ mvn -Pnative package
263292```
264293
265294Finally, you can run the native executable:
0 commit comments