mirror of
https://github.com/ParkerTenBroeck/automata.git
synced 2026-06-06 21:24:06 -04:00
15 lines
No EOL
463 B
Bash
Executable file
15 lines
No EOL
463 B
Bash
Executable file
|
|
|
|
CRATE_NAME="automata-web"
|
|
TARGET_NAME="automata-web"
|
|
OUT_FILE_NAME="./root/automata.wasm"
|
|
mkdir root
|
|
TARGET="../target"
|
|
|
|
|
|
cargo build --package automata-web --target wasm32-unknown-unknown --release
|
|
TARGET_NAME="${CRATE_NAME}.wasm"
|
|
WASM_PATH="${TARGET}/wasm32-unknown-unknown/release/$TARGET_NAME"
|
|
|
|
wasm-bindgen ${WASM_PATH} --out-dir root --out-name ${OUT_FILE_NAME} --no-modules --no-typescript
|
|
wasm-opt ${OUT_FILE_NAME} -O2 --fast-math -g -o ${OUT_FILE_NAME} |