Scripts to compile libraries to WebAssembly using Bazel.
To get (somewhat) reproducible results, run the builds in a Docker container. To get a shell within the container, run build the image and run it:
$ docker build -t wasm docker
$ docker run -it -v "${PWD}:/build" wasmThen build targets as usual. To compile WebAssembly using the Emscripten
toolchain, pass --cpu=wasm32. Pass -c opt for an optimised build.
| Build Label | Version |
|---|---|
//tools/emscripten |
3.1.47 🔗 |
//tools/llvm |
17.0.2 🔗 |
To get a Clang toolchain in a Nix environment, run nix-shell, it will pick up
the shell.nix file in the repo. This will set $CC to clang, along with
any necessary standard library paths.