Initial wasm simulator checkpoint
This commit is contained in:
16
build-wasm.sh
Executable file
16
build-wasm.sh
Executable 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/
|
||||
Reference in New Issue
Block a user