2025-03-31 11:36:57 +02:00

10 lines
245 B
Bash

#!/bin/bash
scriptSrc=$1
scriptWasm=${scriptSrc%.c}.wasm
echo "Compiling $scriptSrc -> $scriptWasm"
emcc --no-entry -O3 -s ERROR_ON_UNDEFINED_SYMBOLS=0 $scriptSrc -o $scriptWasm
echo "Stubbing $scriptWasm"
wasi-stub $scriptWasm -o $scriptWasm