@ondeinference / ed Mirror · read-only
Fork 0

Read-only mirror of github.com/ondeinference/ed.

Mirrored from https://github.com/ondeinference/ed.git

Synced Nov 23, 01:00 UTC

development
sh 13 lines 602 Bytes
Raw
1 #!/usr/bin/env bash
2 # Build the wasm package into www/pkg. Serve www/ with any static server:
3 # python3 -m http.server -d www 8080
4 # Extra arguments go to `cargo`, e.g. a local onde checkout:
5 # ./build.sh --config 'patch.crates-io.onde.path="../../../onde"'
6 set -euo pipefail
7 cd "$(dirname "$0")"
8
9 # simd128 is what makes CPU inference usable in a browser. Every current
10 # browser supports it, and main.js checks for it before loading anything.
11 export RUSTFLAGS="${RUSTFLAGS:+$RUSTFLAGS }-C target-feature=+simd128"
12
13 wasm-pack build --target web --release --out-dir www/pkg --no-typescript -- "$@"