scripts/build-web.sh 371 B · 11 lines · raw · history
| 1 | #!/usr/bin/env bash |
| 2 | set -euo pipefail |
| 3 | cd "$(dirname "")/.." |
| 4 | profile="${1:-wasm-release}" |
| 5 | cargo build --target wasm32-unknown-unknown --profile "$profile" |
| 6 | out=target/web |
| 7 | mkdir -p "$out" |
| 8 | cp web/index.html "$out/" |
| 9 | wasm-bindgen --no-typescript --target web --out-dir "$out" --out-name simulator \ |
| 10 | "target/wasm32-unknown-unknown/$profile/simulator.wasm" |
| 11 | echo "built $out" |