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