20 lines
646 B
Bash
Executable File
20 lines
646 B
Bash
Executable File
#!/bin/sh
|
|
# Builds the dice plugin and leaves the module next to its manifest.
|
|
#
|
|
# The plugin is its own workspace, so this never touches the lock file or the
|
|
# profile of the app. The host looks for `plugin.wasm` inside the plugin
|
|
# folder of a vault; `dice.wasm` is the build artefact the engine test loads.
|
|
|
|
set -eu
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
# The launcher may point the target dir somewhere else; keep it.
|
|
TARGET_DIR="${CARGO_TARGET_DIR:-$PWD/target}"
|
|
|
|
cargo build --release --target wasm32-unknown-unknown --target-dir "$TARGET_DIR"
|
|
|
|
cp "$TARGET_DIR/wasm32-unknown-unknown/release/notescraft_dice.wasm" dice.wasm
|
|
|
|
echo "built $(pwd)/dice.wasm"
|