mirror of
https://github.com/ParkerTenBroeck/automata.git
synced 2026-06-06 21:24:06 -04:00
adding web
This commit is contained in:
parent
d34136f70b
commit
f155a3d7d8
8 changed files with 229 additions and 37 deletions
15
web/build.sh
Executable file
15
web/build.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
|
||||
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}
|
||||
Loading…
Add table
Add a link
Reference in a new issue