Files
wifi-densepose/examples/scipix/web/build.sh
ruv d803bfe2b1 Squashed 'vendor/ruvector/' content from commit b64c2172
git-subtree-dir: vendor/ruvector
git-subtree-split: b64c21726f2bb37286d9ee36a7869fef60cc6900
2026-02-28 14:39:40 -05:00

33 lines
677 B
Bash
Executable File

#!/bin/bash
set -e
echo "Building Mathpix WASM module..."
# Check if wasm-pack is installed
if ! command -v wasm-pack &> /dev/null; then
echo "wasm-pack not found. Installing..."
cargo install wasm-pack
fi
cd "$(dirname "$0")/.."
# Build for production
echo "Building release..."
wasm-pack build \
--target web \
--out-dir web/pkg \
--release \
-- --features wasm
echo "✓ Build complete!"
echo " Output: web/pkg/"
echo " Size: $(du -sh web/pkg/ruvector_scipix_bg.wasm | cut -f1)"
# Run demo server
if [ "$1" = "--serve" ]; then
echo ""
echo "Starting demo server on http://localhost:8080"
cd web
python3 -m http.server 8080
fi