#!/usr/bin/env bash # Reproducible proof that the wasm32 FULL conditional-codec decode is byte- # identical to the native reference. Builds the nodejs-target pkg and runs the # check against the export-tool artifacts (default /tmp/sota_int). # from wai-web/: ./demo/verify_int_hyper.sh [model-dir] set -euo pipefail cd "$(dirname "$0")/.." # wai-web/ command -v wasm-pack >/dev/null || { echo "needs wasm-pack"; exit 1; } command -v node >/dev/null || { echo "needs node"; exit 1; } # Build output is not discarded: a failed build must show why. wasm-pack build --release --target nodejs --out-dir demo/pkg-node --out-name wai_web node demo/verify_int_hyper_wasm.mjs ./pkg-node/wai_web.js "${1:-${WAI_SOTA_INT_DIR:-/tmp/sota_int}}"