21 lines
443 B
Bash
Executable file
21 lines
443 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
PROFILE="${1:-release}"
|
|
|
|
if [ "$PROFILE" = "dev" ]; then
|
|
PROFILE_DIR="debug"
|
|
CARGO_FLAGS=""
|
|
else
|
|
PROFILE_DIR="release"
|
|
CARGO_FLAGS="--release"
|
|
fi
|
|
|
|
cargo build $CARGO_FLAGS --target wasm32-unknown-unknown -p app
|
|
|
|
mkdir -p static
|
|
wasm-bindgen --out-name 3dscene \
|
|
--out-dir static \
|
|
--target web \
|
|
"target/wasm32-unknown-unknown/$PROFILE_DIR/app.wasm"
|
|
cp web/index.html static/
|