wasm/docs/contributor/Building.md
mx)git (to download, update, and locate repositories)To build GraalWasm, you need to follow the standard workflow for Graal projects. We summarize the basic steps below:
Create a new folder where your repositories mx and graal should be located:
$ mkdir graalvm
$ cd graalvm
Clone mx and add it to the PATH:
$ git clone https://github.com/graalvm/mx.git
$ export PATH=$PWD/mx:$PATH
Clone the graal repository and enter the wasm directory:
$ git clone https://github.com/oracle/graal.git
$ cd graal/wasm
Set JAVA_HOME:
$ export JAVA_HOME=[path to JDK]
Build the project:
$ mx --dynamicimports /compiler build
These steps will build the wasm.jar file in the mxbuild/dists/jdk<version> directory, which contains GraalWasm.
To run a .wasm file, you can use the following command:
bash $ mx --dynamicimports /compiler wasm somefile.wasm
For instructions how to run the tests, see Tests and Benchmarks.