10 lines
245 B
Bash
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 |