Initial wasm simulator checkpoint

This commit is contained in:
CNC Local
2026-05-22 04:43:21 +08:00
commit 55d9fff9f0
54 changed files with 5523 additions and 0 deletions

16
build-wasm.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")"
if ! command -v emcmake >/dev/null 2>&1; then
echo "Emscripten is required. Install/activate emsdk so emcmake and emcc are in PATH." >&2
exit 1
fi
emcmake cmake -S core -B build/wasm -DCMAKE_BUILD_TYPE=Release
cmake --build build/wasm
mkdir -p web/public
cp build/wasm/cnc_sim.js web/public/
cp build/wasm/cnc_sim.wasm web/public/