- Python 3 (required by
mx
) - GIT (to download, update, and locate repositories)
- JDK 11+
- emscripten or wasi-sdk for translating C files
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
andgraal
should be located:$ mkdir graalvm $ cd graalvm
-
Clone
mx
and add it to thePATH
:$ 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 --dy /truffle,/compiler build
These steps will build the wasm.jar
file in the mxbuild/dists/jdk<version>
directory, which contains GraalWasm.