This repository does not rely on a frozen/hand-restored WASM artifact.
web/protoscript.{js,wasm,data} must be reproducible from source with the canonical build:
make web-clean
make webAny modification of the C frontend (c/frontend.c) requires a full rebuild of the WASM target:
make webRunning WASM tests without rebuilding can cause diagnostic divergences between native CLI and WASM.
Validated toolchain used for parity:
- Node.js:
v22.16.0 - Emscripten:
4.0.23 - emcc clang:
22.0.0git
You can print local versions with:
node -v
emcc -v
python3 --versionWith newer Emscripten versions, relying on the default WASM stack size can trigger runtime failures
(memory access out of bounds) on normal ProtoScript programs.
To keep runtime behavior stable across rebuilds, the build now sets:
WEB_STACK_SIZE := 1048576(1 MiB)
through the canonical WEB_LDFLAGS in the root Makefile.
This removes dependence on toolchain-default stack sizing and keeps WASM parity with native C runtime.
After make web, validate with:
tests/run_runtime_triangle_parity.sh
tests/run_all.shAcceptance criterion: both commands pass without restoring any previously committed WASM binary.