open-standards/wai/quickstart/build.sh
Transaction Science 1f0ab6ebf1
All checks were successful
joule-moq-remote host agent / joule-moq-remote · does this change touch it (pull_request) Successful in 6s
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Successful in 8s
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Successful in 6s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 8s
wai-audit collector and player integration / does this change touch it (pull_request) Successful in 7s
WAI operation catalogue / does this change touch it (pull_request) Successful in 7s
wai-app and Create / wai-app · does this change touch it (pull_request) Successful in 15s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (pull_request) Successful in 14s
WAI conformance / does this change touch it (pull_request) Successful in 5s
WAI examples / WAI examples · does this change touch them (pull_request) Successful in 7s
wai-fleet service / does this change touch it (pull_request) Successful in 5s
WAI energy receipts / does this change touch it (pull_request) Successful in 18s
WAI JPEG-AI whole decode (pinned inputs, required) / does this change touch it (pull_request) Successful in 8s
wai-key-proxy / does this change touch it (pull_request) Successful in 8s
wai-ledger service / does this change touch it (pull_request) Successful in 5s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 8s
wai-quantum docs, course and locales / does this change touch it (pull_request) Successful in 6s
wai-ops-gpu integer operators on GPUs / does this change touch it (pull_request) Successful in 9s
WAI neural sink gates / does this change touch it (pull_request) Successful in 19s
wai-quantum for JavaScript / does this change touch it (pull_request) Successful in 7s
wai-quantum WebGPU member / does this change touch it (pull_request) Successful in 6s
wai-quantum studio and desktop / does this change touch it (pull_request) Successful in 10s
wai-sink-android native sink library / does this change touch it (pull_request) Successful in 7s
WAI mbt2018_mean integer decode (regenerated vectors) / does this change touch it (pull_request) Successful in 11s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 7s
wai-web wasm32 / does this change touch it (pull_request) Successful in 8s
WAI Studio / does this change touch it (pull_request) Successful in 11s
wai-sink-swift native sink package / does this change touch it (pull_request) Successful in 17s
joule-code conformance gate / joule-moq-relay, every target (pull_request) Successful in 3m4s
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Successful in 3m16s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 2m5s
joule-code conformance gate / joule-moq-ingest, every target (pull_request) Successful in 5m8s
WAI conformance / fast integer kernels, every x86_64 kernel set (AVX-512 silicon) (pull_request) Successful in 3m22s
joule-code conformance gate / joule-moq-relay, its own energy on a counter (macos) (pull_request) Successful in 36s
wai-app and Create / wai-app · tests, clippy, the line language's verifier (linux) (pull_request) Successful in 35s
wai-audit collector and player integration / collector · linux (pull_request) Successful in 1m8s
wai-quantum WebGPU member / member · DX12 and Vulkan (cbio-windows) (pull_request) Successful in 12m1s
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (pull_request) Successful in 2m42s
WAI conformance / cross-arch byte-equality · linux (pull_request) Successful in 27s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (pull_request) Successful in 3m10s
WAI conformance / faces from keypoints under wasm32-wasip2 (wasmtime) (pull_request) Successful in 1m42s
WAI operation catalogue / the catalogue and every door · linux (pull_request) Successful in 6m13s
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Successful in 4m14s
wai-quantum WebGPU member / member · integrated GPU, Vulkan (framework-128gb) (pull_request) Successful in 10m34s
wai-fleet service / service · linux (pull_request) Successful in 2m26s
wai-ledger service / service · linux (pull_request) Successful in 2m2s
wai-key-proxy / proxy · linux (pull_request) Successful in 2m59s
wai-pack / wai-pack · linux (pull_request) Successful in 2m5s
wai-quantum docs, course and locales / the Studio's words in every locale · linux (pull_request) Successful in 26s
wai-quantum docs, course and locales / the course and the command line's languages · linux (pull_request) Successful in 2m45s
wai-quantum WebGPU member / member · GPU, Vulkan (jetson-hub) (pull_request) Successful in 22m31s
WAI JPEG-AI whole decode (pinned inputs, required) / fetch pinned JPEG-AI inputs → whole decode + pixel hash, required (pull_request) Successful in 7m26s
WAI neural sink gates / model-free refusals of the neural sink (pull_request) Successful in 2m2s
WAI examples / WAI examples · portable · linux (pull_request) Successful in 9m31s
WAI neural sink gates / the exact JPEG-AI decoder reports its path (pinned inputs, required) (pull_request) Successful in 2m52s
wai-quantum WebGPU member / member · GPU, Vulkan (thor) (pull_request) Successful in 24m59s
wai-quantum WebGPU member / member · software Vulkan (linux) (pull_request) Successful in 2m16s
wai-quantum for JavaScript / javascript · linux (pull_request) Successful in 3m47s
wai-quantum WebGPU member / shader checks · browser build · wasip2 inertness (pull_request) Successful in 3m57s
wai-quantum studio and desktop / studio · browser (pull_request) Successful in 3m53s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m57s
WAI Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Successful in 1m6s
wai-ops-gpu integer operators on GPUs / builds · no adapter is not a pass (linux) (pull_request) Successful in 8m6s
wai-quantum studio and desktop / desktop app · windows (pull_request) Successful in 9m36s
WAI energy receipts / energy receipts · linux (pull_request) Successful in 14m34s
WAI mbt2018_mean integer decode (regenerated vectors) / regenerate mbt2018_mean integer vectors → Rust decode, required (pull_request) Successful in 6m37s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 5m30s
WAI conformance / cargo-class corpora · linux (pull_request) Successful in 19m54s
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Successful in 5m27s
wai-quantum studio and desktop / desktop app · linux (pull_request) Successful in 12m3s
WAI Studio / Studio in WebKit · linux (pull_request) Successful in 10m30s
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Successful in 22m30s
joule-moq-remote host agent / joule-moq-remote, every target (macos) (pull_request) Successful in 1m2s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Successful in 1m52s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 12m16s
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (pull_request) Successful in 1m20s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 17m11s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 30s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 1m10s
joule-moq-room room service / joule-moq-room, every target (pull_request) Successful in 3m54s
wai-app and Create / wai-app · Create, browser end-to-end (macos) (pull_request) Successful in 7m52s
wai-fleet service / service · macos (pull_request) Successful in 43s
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Successful in 30s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 6m52s
WAI energy receipts / energy receipts · macos (pull_request) Successful in 9m7s
wai-ledger service / service · macos (pull_request) Successful in 1m26s
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Successful in 17s
WAI conformance / cargo-class corpora · macos (pull_request) Successful in 20m26s
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Successful in 43s
wai-pack / wai-pack · macos (pull_request) Successful in 4m19s
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Successful in 2m38s
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Successful in 13m34s
wai-quantum WebGPU member / member · Metal (macos) (pull_request) Successful in 3m26s
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Successful in 19m27s
wai-quantum WebGPU member / member · browser WebGPU (macos) (pull_request) Successful in 2m5s
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Successful in 23m32s
wai-pack / wai-pack · linux-arm64 (pull_request) Successful in 2m27s
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Successful in 7m32s
wai-pack / wai-pack · the floor through a media prober (pull_request) Successful in 37s
wai-pack / wai-pack · dependency licences (pull_request) Successful in 19s
wai-ops-gpu integer operators on GPUs / Metal GPU and browser WebGPU (macos) (pull_request) Successful in 11m58s
wai-quantum studio and desktop / desktop app · macos (pull_request) Successful in 5m11s
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Successful in 7m35s
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Successful in 3m25s
wai-pack / wai-pack · independent verifier (Python) (pull_request) Successful in 7m20s
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Successful in 12m0s
WAI Studio / Studio in Chromium and Firefox · macos (pull_request) Successful in 10m54s
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Successful in 17m29s
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Successful in 1h30m12s
wai/toolchain-fixes, converted to the layout of the fix: no shared append point
The change of wai/toolchain-fixes (69f88e62f..074658780, 21 commits), on the fix branch: its
changelog entries as files of wai/changes/, its wai-conformance.yml edits as step files,
corpus files and test tags, and every other file as the branch has it.

- b04013914 holdings: the registry lists WHD1, the record's magic (§4.1)
- a184abb87 catalogue: upscale and tonemap are recorded in N3's verb list, and the doors' check knows them
- 8db31a778 wai mcp: MCP 2026-07-28, the stateless revision, beside the three initialize negotiates
- 052830194 wai.json: $schema, wai and name, and the schema of version 1 committed beside the reader
- 163fc2017 wai create: every template carries an AGENTS.md
- fe9b26fbc joule-moq-room: the example names the relay's WebSocket port, 4480, and one test holds every port
- 359b5ba9d quickstart: the archive carries WAI Studio, wai-ingest and wai-quantum
- 6334d88c8 joule-moq-room: the port table holds every daemon's default, and the listeners off until set
- d38610de6 wai.json: the two workflows that hold the schema to its reader run when the schema changes
- 179df52b7 catalogue: the two verbs joined the list after wai 0.4.0, not in toolchain 0.3.0
- 971cf5862 wai.json: a file of a later version is refused as that version before any member it adds
- 1a59a39f7 wai.json: the reader takes a whole number however it is written, and the tests run the name pattern
- d752fd9b4 wai.json: the release waits for the schema to be served, and version 1 is fixed by the first release that writes it
- c213ed9db wai mcp: -32022 names as supported only the revisions a request may name, never the one asked for
- 99b800f29 wai mcp: initialize negotiates 2025-11-25, the last revision with a handshake
- e33021c3f catalogue: the near-synonym list is held in every text that states it, and the doors' check knows up
- b99bb70be catalogue: the changelog records the near-synonym list held with the verb list
- a0beb2163 quickstart: the wai formula and manifest depend on wai-quantum's own instead of installing a second copy
- 0e5084031 quickstart: Studio's build leaves the checkout as it found it, and the examples workflow runs clean-machine.sh
- 4cc4ae3d7 joule-moq-room: the port test reads the gateway's example with the gateway's own reader, and starts the gateway from it
- 074658780 quickstart: the changelog names where Studio's build goes, not where it went before it shipped

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 01:45:34 -05:00

117 lines
6.9 KiB
Shell
Executable file

#!/usr/bin/env bash
# The quickstart archive: the `wai` command line and what `wai dev` runs, for one target.
#
# bash wai/quickstart/build.sh <out-dir> --web <dir> --studio <dir> [--target <triple>] [--version <v>]
#
# Builds, each release and --locked, each from its own workspace:
# wai wai/wai-rs, --no-default-features --features quickstart: the mandatory
# floor, hello, create, dev and verify; no system codec library
# wai-relay the relay (crate joule-moq-relay, joule-code/joule-code-rs)
# wai-room the room service (crate joule-moq-room)
# wai-ingest the ingest gateway: WHIP, WHEP, SRT and RTMP into a room (crate joule-moq-ingest)
# wai-remote-host a remote desktop room's host agent
# wai-pack the packager
# wai-quantum the quantum command line (wai/wai-quantum-cli), with the features its own
# release builds it with (wai-quantum-cli-release.yml): on macOS, metal, the
# state vector on the GPU, so the program install.sh puts on PATH and the one
# Homebrew installs (the wai formula depends on wai-quantum's) are one
# and writes <out-dir>/wai-<version>-<triple>.tar.gz holding bin/ (those seven), share/wai/web/
# (the room client, from --web: bash wai/quickstart/build-web.sh makes it), share/wai/studio/
# (WAI Studio, which `wai dev` serves at /_wai/, from --studio: bash
# wai/quickstart/build-studio.sh makes it), README.md and LICENSE, with <archive>.sha256
# beside it in the form `shasum -a 256 -c` reads. The version
# is wai/wai-rs's unless given; the triple is the host's unless given. Extra cargo flags for
# the target (a linker, static linking) come from the environment, as cargo reads them.
set -euo pipefail
usage() { echo "usage: bash wai/quickstart/build.sh <out-dir> --web <dir> --studio <dir> [--target <triple>] [--version <v>]" >&2; exit 2; }
[ $# -ge 5 ] || usage
ROOT=$(cd "$(dirname "$0")/../.." && pwd)
OUT=$(mkdir -p "$1" && cd "$1" && pwd); shift
WEBDIR="" STUDIODIR="" TRIPLE="" VERSION=""
while [ $# -gt 0 ]; do
case "$1" in
--web) WEBDIR="$2"; shift 2 ;;
--studio) STUDIODIR="$2"; shift 2 ;;
--target) TRIPLE="$2"; shift 2 ;;
--version) VERSION="$2"; shift 2 ;;
*) usage ;;
esac
done
[ -n "$WEBDIR" ] && [ -f "$WEBDIR/room/index.html" ] && [ -f "$WEBDIR/pkg/wai_live_web_bg.wasm" ] && [ -f "$WEBDIR/pkg/joule_moq_web_bg.wasm" ] \
|| { echo "--web: a directory build-web.sh made (room/, moq/, pkg/)" >&2; exit 2; }
[ -n "$STUDIODIR" ] && [ -f "$STUDIODIR/index.html" ] && [ -f "$STUDIODIR/pkg/wai_studio_core_bg.wasm" ] && [ -f "$STUDIODIR/BUILD.json" ] \
|| { echo "--studio: a directory build-studio.sh made (index.html, pkg/, quantum/, BUILD.json)" >&2; exit 2; }
HOST=$(rustc -vV | sed -n 's/^host: //p')
TRIPLE=${TRIPLE:-$HOST}
VERSION=${VERSION:-$(sed -n 's/^version = "\(.*\)"$/\1/p' "$ROOT/wai/wai-rs/Cargo.toml" | head -1)}
EXE=""; case "$TRIPLE" in *windows*) EXE=".exe" ;; esac
QUANTUM=(); case "$TRIPLE" in *apple-darwin) QUANTUM=(--features metal) ;; esac
TGT=(--target "$TRIPLE")
build() { # <dir> <binary> <cargo args...>: the binary's path, or a failure
local dir="$1" bin="$2"; shift 2
(
# Under a target directory shared by every workspace (CARGO_TARGET_DIR), each build gets its
# own: wai also builds as a cdylib, so its rlib's file name carries no hash, and a second
# feature set of it (the room service's) would overwrite the first in one directory.
if [ -n "${CARGO_TARGET_DIR:-}" ]; then export CARGO_TARGET_DIR="$CARGO_TARGET_DIR/quickstart-$bin"; fi
cd "$dir"
cargo build --locked --release "${TGT[@]}" "$@" >&2 || exit 1
t=$(cargo metadata --format-version 1 --no-deps --locked | python3 -c 'import json,sys; print(json.load(sys.stdin)["target_directory"])') || exit 1
echo "$t/$TRIPLE/release/$bin$EXE"
)
}
need() { # <binary> <cargo args...>: copied into the stage, or the script stops
local b
b=$(build "$@") || { echo "build.sh: the build of $2 failed" >&2; exit 1; }
cp "$b" "$STAGE/$NAME/bin/"
}
NAME="wai-$VERSION-$TRIPLE"
STAGE=$(mktemp -d)
trap 'rm -rf "$STAGE"' EXIT
mkdir -p "$STAGE/$NAME/bin" "$STAGE/$NAME/share/wai"
need "$ROOT/wai/wai-rs" wai --no-default-features --features quickstart --bin wai
need "$ROOT/joule-code/joule-code-rs" wai-relay -p joule-moq-relay --bin wai-relay
need "$ROOT/joule-code/joule-code-rs/crates/joule-moq-room" wai-room --bin wai-room
need "$ROOT/joule-code/joule-code-rs" wai-ingest -p joule-moq-ingest --bin wai-ingest
need "$ROOT/joule-code/joule-code-rs/crates/joule-moq-remote" wai-remote-host --bin wai-remote-host
need "$ROOT/wai/wai-pack" wai-pack --bin wai-pack
need "$ROOT/wai/wai-quantum-cli" wai-quantum --bin wai-quantum ${QUANTUM[@]+"${QUANTUM[@]}"}
cp -R "$WEBDIR" "$STAGE/$NAME/share/wai/web"
cp -R "$STUDIODIR" "$STAGE/$NAME/share/wai/studio"
cp "$ROOT/wai/quickstart/README.md" "$STAGE/$NAME/README.md"
cp "$ROOT/wai/LICENSE" "$STAGE/$NAME/LICENSE"
chmod 755 "$STAGE/$NAME"/bin/*
# Each binary runs before it is packaged, where it can run here.
# The wai packaged must hold this checkout's examples, file for file and byte for byte: a stale
# binary would ship templates from another commit.
if [ "$TRIPLE" = "$HOST" ]; then
"$STAGE/$NAME/bin/wai-pack$EXE" fixture list > /dev/null
"$STAGE/$NAME/bin/wai-quantum$EXE" --version > /dev/null
# wai-ingest without a configuration says how it is run, and exits with a usage error.
set +e; "$STAGE/$NAME/bin/wai-ingest$EXE" > /dev/null 2> "$STAGE/ingest.err"; s=$?; set -e
[ "$s" = 2 ] && grep -q "usage: wai-ingest" "$STAGE/ingest.err" || { echo "build.sh: the packaged wai-ingest does not run" >&2; exit 1; }
rm -f "$STAGE/ingest.err"
python3 - "$STAGE/$NAME/bin/wai$EXE" "$ROOT/wai/examples" <<'PY' || { echo "build.sh: the packaged wai does not hold this checkout's examples" >&2; exit 1; }
import json, os, subprocess, sys, tempfile
wai, ex = sys.argv[1], sys.argv[2]
with tempfile.TemporaryDirectory() as d:
for t in json.loads(subprocess.check_output([wai, "create", "--list", "--json"]))["data"]:
out = os.path.join(d, t["template"])
subprocess.check_output([wai, "create", out, "--template", t["template"]])
for f in t["files"]:
src = os.path.join(ex, t["template"], f)
if os.path.exists(src) and open(src, "rb").read() != open(os.path.join(out, f), "rb").read():
sys.exit(f"{t['template']}/{f} differs")
PY
fi
mkdir -p "$OUT"
# The same bytes for the same inputs: sorted names, fixed owner and times.
if tar --version 2>/dev/null | grep -q GNU; then
tar --sort=name --owner=0 --group=0 --numeric-owner --mtime='2026-01-01 00:00Z' -C "$STAGE" -cf - "$NAME" | gzip -n -9 > "$OUT/$NAME.tar.gz"
else
tar -C "$STAGE" -cf - "$NAME" | gzip -n -9 > "$OUT/$NAME.tar.gz"
fi
( cd "$OUT" && { command -v sha256sum >/dev/null && sha256sum "$NAME.tar.gz" || shasum -a 256 "$NAME.tar.gz"; } > "$NAME.tar.gz.sha256" )
echo "packaged $OUT/$NAME.tar.gz ($(cut -d' ' -f1 "$OUT/$NAME.tar.gz.sha256"), $(du -h "$OUT/$NAME.tar.gz" | cut -f1))"