This repo contains a toolchain to build WebAssembly with grad_aff. It also contains the source code of the WebAssembly used in paa.gruppe-adler.de.
The makefile can be easily used within the Docker Image and does multiple things at once:
- Compiles
grad_aff_paa.cto WebAssembly - Optimizes WebAssembly with
wasm-opt - Compiles TypeScript glue code (
index.ts) to JavaScript - Copies
index.htmlto release (example html code, for quick testing)
The docker image serves as an "SDK" to build the WebAssembly and the custom JS glue-code. It has all required build tools and libraries installed to build WebAssembly with grad_aff.
| Name | Version | Links |
|---|---|---|
| Emscripten SDK | 2.0.20 | GitHub |
Binaryen's wasm-opt |
101 | GitHub |
| Typescript compiler | 4.2.4 | GitHub |
All libraries are installed in /usr/local.
| Name | Version | Links |
|---|---|---|
| lzokay | commit 546a969 |
GitHub |
| ordered-map | 1.0.0 | GitHub |
| zlib | 1.2.11 | Homepage |
| libpng | 1.6.35 | GitHub |
| boost | 1.76.0 | Homepage |
| libsquish | 1.15 | - |
| PEGTL | 3.2.0 | GitHub |
| grad_aff | commit d6689c0 |
GitHub |
The image can be built like any other docker image:
docker build -t grad_aff_wasm_sdk . 2> build.log
Either start a sdk-container with an interactive shell (to run make multiple times or write your own Makefile / build script):
docker run --rm -it -v ${PWD}:/usr/src/app grad_aff_wasm_sdk /bin/sh
or just run make once within the sdk-container:
docker run --rm -v ${PWD}:/usr/src/app grad_aff_wasm_sdk make