open-standards/wai/quickstart
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 213c6aee6c wai doctor: ends what an answered program leaves running; CI checks each archive
Linux and macOS: a program asked is now waited for with waitid and
WNOWAIT, which leaves it unreaped. Once it has exited, its process
group gets SIGKILL, and only then is it reaped. While the leader is an
unreaped zombie, its group's number cannot be given to another group.
So this ends what the program left running behind it, whether or not
it answered, and nothing else. A program that does not answer in time
is stopped with its group before it is reaped, as before. Other Unix
systems keep the polling wait. On Windows the job's kill-on-close does
the same, and the new test runs there too.

A program file that is open for writing somewhere cannot be run for a
moment (ETXTBSY), for example one just written while another thread of
this process starts a program. A spawn refused so is now tried again
for up to 200 ms. This was a real flake in the tests that write
stand-in programs, and wai doctor itself asks several programs at once.

CI: wai/quickstart/test/archive_doctor.py runs bin/wai doctor --json
from an unpacked archive, with the archive's bin first on PATH. It
fails unless every install and stack check passes and each piece those
checks found is inside the archive. Without that, a relay elsewhere on
PATH or Studio's files from WAI_STUDIO would hide a piece the archive
lacks. Ports, browsers and the keystore are printed, not required.
stack.web and stack.studio now name their path in facts.

The release runs it on every leg that builds an archive: macOS where
the triple is the host's, Linux x86_64 and arm64, and Windows on the
staged directory. At PR time it runs on the macOS archive wai-examples
builds, the only archive built then. archive_doctor_test.py runs it
against stand-ins in wai-examples' portable job.

Real browsers on Linux: wai-studio's webkit job runs in the browser
image and builds wai. It now requires browser.conformance to pass with
that wai.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 17:24:17 -05:00
..
test wai doctor: ends what an answered program leaves running; CI checks each archive 2026-11-06 17:24:17 -05:00
build-studio.sh wai/toolchain-fixes, converted to the layout of the fix: no shared append point 2026-11-05 01:45:34 -05:00
build-web.sh wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
build.sh wai doctor: whether this machine can run the toolchain, one check to a line 2026-11-06 17:24:16 -05:00
formulae.py wai/toolchain-fixes, converted to the layout of the fix: no shared append point 2026-11-05 01:45:34 -05:00
install.sh wai/toolchain-fixes, converted to the layout of the fix: no shared append point 2026-11-05 01:45:34 -05:00
publish.sh The service binaries are wai-relay, wai-room and wai-ingest; the crates keep their names 2026-10-27 04:52:31 -04:00
README.md wai doctor: a browser counts when it runs, and on Windows a hung program's tree is stopped 2026-11-06 17:24:17 -05:00

WAI

The wai command line, and the reference software wai dev runs on your own machine. All of it is open source under Apache-2.0, built from the open-standards repository (wai/quickstart/build.sh).

File What it is
bin/wai The command line: hello, create, dev, verify, doctor, and the envelope tools (inspect, wrap, unwrap, encode, decode for the mandatory floor, capabilities)
bin/wai-relay The relay a room's media goes through: MOQT over QUIC, WebTransport and WebSocket
bin/wai-room The room service: a room's keys, its grants, its clock
bin/wai-ingest The ingest gateway: WHIP, SRT and RTMP into a room, each group signed at the first hop, and WHEP out
bin/wai-remote-host A remote desktop room's host agent
bin/wai-pack The packager: a title as WAI objects, HTTP playlists and a MoQ catalog
bin/wai-quantum The quantum command line: OpenQASM programs run on this machine, the result signed
share/wai/web/ The room client a browser loads: its pages and their WebAssembly
share/wai/studio/ WAI Studio, which wai dev serves at /_wai/

Start

wai hello                                   # WAI's four steps on a sample: name, dispatch, rebuild, receipt
wai create my-room --template video-room    # a video room in one page
cd my-room
wai dev                                     # the relay, the room service and your page, on 127.0.0.1:8080
wai verify ../wai-hello                     # the receipts hello wrote, checked offline

wai create --list names every template. wai dev --help gives its options. Nothing here needs an account, and nothing is sent off your machine.

Keep bin/ and share/ side by side: wai dev finds the relay, the room service, the room client and Studio beside itself. Homebrew and Scoop install wai-quantum as a package of its own, which wai depends on.

Check this machine

wai doctor                                  # one check to a line; --json for the same as an envelope

says whether this machine can run all of this: this wai and what wai reaches at a prompt, the relay and the room service and whether they are of this wai's version, each port in the table below, the browsers for Studio and for the browser harnesses, each asked its version and passed only when one runs, and where wai key keeps keys and who else may reach them. A check that fails says what to do. One that could not be run reads "not checked" with the reason, which is not a pass, and the last line says which of the three the run came to: passed, failed, or passed with some not checked. It exits 1 when a check failed. It sends nothing off this machine, writes nothing, reads no secret and raises no prompt, so on macOS whether the login keychain is unlocked always reads not checked, and a browser that would open a window to say its version (a WebKit browser, and on Windows any windowed program) is not started and says so.

Ports

What each program listens on by default, on 127.0.0.1. wai dev serves everything on one origin and runs its own relay and room service on free ports behind it; the other rows are each daemon's own default, as its example configuration or its source sets it, for running it alone. No two of them share a port, so any of them run side by side. A deployment sets its own.

Port Program What Set by
8080 wai dev your page at /, the room service at /room-api/, the relay at /moq, Studio at /_wai/ --port
4443/udp wai-relay MOQT over QUIC, and WebTransport quic_listen
4480 wai-relay MOQT over WebSocket websocket_listen
9682 wai-room the room service's HTTP API listen
8088 wai-ingest WHIP and WHEP [http] listen
1935 wai-ingest RTMP [rtmp] listen
1936 wai-ingest RTMPS, off until set [rtmp] tls_listen
5167 wai-ingest SCTE 104 automation, off until set [injector] listen
9000/udp wai-ingest SRT, off until set [contrib.srt] listen
9694 wai-audit the audit collector WAI_AUDIT_ADDR
8251 wai-ledger the receipt ledger WAI_LEDGER_ADDR
8252 wai-fleet the fleet service WAI_FLEET_ADDR
8241 wai-quantum-service the quantum job service WAI_QSVC_ADDR
9670 wai-world-relay the interactive worlds' relay WAI_RELAY_BIND
9690 wai_stitched_presentation serve the stitched presentation verifier --listen
8380 wai http origin an HTTP origin of WAI objects --port

A program that reaches another names that one's port: the room service's relay_url is the relay's WebSocket (ws://127.0.0.1:4480/moq), and the ingest gateway's [relay] addr is the relay's QUIC endpoint (127.0.0.1:4443). joule-moq-room's tests/ports.rs holds every row to the program that serves it.

More