#!/usr/bin/env bash # Builds crates/didbot-site-anim for the browser and drops the result where # `crates/didbot-serve`'s dashboard serves it from: # crates/didbot-serve/assets/dashboard/wasm/. Same crate, same wave field # (`wave.rs`) as scripts/build-wasm.sh builds for the site's prototype F, in # a second output directory: `didbot-serve` and the site are different served # processes with no runtime relationship to each other. The dashboard serves # no TypeScript declarations, so the .d.ts files are dropped. # # An opt-in step, not part of `cargo build --workspace` or `cargo test # --workspace`: see scripts/build-wasm.sh. The dashboard falls back to a # still background when this has not been run — see # crates/didbot-serve/src/dashboard.rs's `wasm_asset` doc comment. set -euo pipefail cd "$(dirname "$0")/.." out_dir="crates/didbot-serve/assets/dashboard/wasm" scripts/build-wasm.sh didbot-site-anim "$out_dir" site-anim rm -f "$out_dir"/*.d.ts