build.sh 272 B

123456789
  1. #!/bin/sh
  2. # Builds this crate as a WASM component.
  3. set -eu
  4. PROJ="$(basename "$PWD")"
  5. TARGET=wasm32-unknown-unknown
  6. TARGET_DIR=../../target/$TARGET/debug
  7. cargo build --target $TARGET
  8. wasm-tools component new $TARGET_DIR/"$PROJ".wasm -o $TARGET_DIR/"$PROJ".component.wasm