mara2/build.sh

11 lines
344 B
Bash
Executable File

#!/usr/bin/env bash
set -e
mkdir -p dist
rm -rf dist/*
cargo build --release
wasm-snip --snip-rust-fmt-code --snip-rust-panicking-code ./target/wasm32-unknown-unknown/release/cart.wasm -o ./dist/mara2_snip.wasm
wasm-opt -Oz --zero-filled-memory --strip-producers --dce ./dist/mara2_snip.wasm -o ./dist/mara2.wasm
wasm-strip ./dist/mara2.wasm