#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")/.." profile="${1:-wasm-release}" cargo build --target wasm32-unknown-unknown --profile "$profile" out=target/web mkdir -p "$out" cp web/index.html "$out/" wasm-bindgen --no-typescript --target web --out-dir "$out" --out-name simulator \ "target/wasm32-unknown-unknown/$profile/simulator.wasm" echo "built $out"