# Working on this project This is a WAI project made from the `encoder-ingest` template: a program (`src/main.rs`) that starts a relay and an ingest gateway on this machine, takes an SRT encoder's stream into a room, and verifies each group of each track against the receipt the gateway signed as the first hop. - **Build.** `cargo build --release`. The first build fetches the WAI repository named in `Cargo.toml` and compiles the relay and the gateway. - **Run.** `cargo run --release` prints an `srt://127.0.0.1:…` address; point an SRT encoder at it (MPEG-TS, H.264 or HEVC video and AAC audio, caller mode, the stream ID and passphrase given). - **Test.** `cargo run --release -- --synthetic 5` sends five seconds of a synthetic program itself and exits 0 once every group verified, non-zero otherwise. Run it after every change. - **Conform.** A group is accepted only when its receipt verifies; never weaken that check to make a stream pass. The gateway also takes RTMP and WHIP and serves WHEP; its configuration is `gateway.example.toml` in the repository's `joule-moq-ingest` crate. - `wai.json` is the project file; its `$schema` names the schema editors validate it with. Keep `name` a lowercase DNS label. - Never put a key, a token or any other secret in this repository. The stream's passphrase is made at each start and printed, never stored. - WAI's tools for a coding agent: `wai mcp` (`wai setup-agent` registers it).