open-standards/joule-code/joule-code-rs/crates/joule-contrib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 5c4759516c
Some checks failed
joule-moq-remote host agent / joule-moq-remote · does this change touch it (pull_request) Successful in 11s
joule-moq-room room service / joule-moq-room · does this change touch it (pull_request) Successful in 12s
wai-web reach builds / wai-web reach · does this change touch it (pull_request) Successful in 11s
joule-moq-web browser client / joule-moq-web · does this change touch it (pull_request) Successful in 11s
wai-app and Create / wai-app · does this change touch it (pull_request) Successful in 12s
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 39s
joule-code conformance gate / Build + round-trip C1-C4 vectors (pull_request) Successful in 1m27s
joule-moq-remote host agent / joule-moq-remote, every target (macos) (pull_request) Successful in 1m27s
wai-web reach builds / wai-web reach builds · the package of record, every output as recorded (pull_request) Successful in 2m47s
joule-code conformance gate / joule-moq-ingest, every target (pull_request) Failing after 3m1s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 38s
wai-audit collector and player integration / does this change touch it (pull_request) Successful in 11s
WAI breaking changes and the conformance runner / WAI breaking · does this change touch WAI (pull_request) Successful in 28s
joule-code conformance gate / joule-moq-relay, every target (pull_request) Successful in 4m26s
WAI conformance / does this change touch it (pull_request) Successful in 12s
WAI operation catalogue / does this change touch it (pull_request) Successful in 15s
WAI energy receipts / does this change touch it (pull_request) Successful in 9s
WAI examples / WAI examples · does this change touch them (pull_request) Successful in 8s
wai-fleet service / does this change touch it (pull_request) Successful in 11s
wai-ledger service / does this change touch it (pull_request) Successful in 12s
wai-pack / wai-pack · does this change touch it (pull_request) Successful in 11s
wai-quantum docs, course and locales / does this change touch it (pull_request) Successful in 10s
wai-quantum studio and desktop / does this change touch it (pull_request) Successful in 12s
wai-quantum for JavaScript / does this change touch it (pull_request) Successful in 13s
wai-web reach builds / wai-web reach builds · this tree's wai-web, every rung on its engine line (pull_request) Successful in 5m22s
repository checks / lockfiles, advisories, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 5m37s
wai-sink-android native sink library / does this change touch it (pull_request) Successful in 15s
wai-sink-swift native sink package / does this change touch it (pull_request) Successful in 14s
WAI Studio / does this change touch it (pull_request) Successful in 10s
wai-web wasm32 / does this change touch it (pull_request) Successful in 19s
WAI conformance / fast integer kernels, every x86_64 kernel set (AVX-512 silicon) (pull_request) Successful in 3m22s
joule-moq-remote host agent / joule-moq-remote, every target (linux-arm64) (pull_request) Successful in 2m57s
wai-audit collector and player integration / collector, player integration and the browser end to end · macos (pull_request) Successful in 2m10s
wai-audit collector and player integration / collector · linux (pull_request) Successful in 1m4s
wai-app and Create / wai-app · Create, browser end-to-end (macos) (pull_request) Successful in 9m51s
WAI conformance / cross-arch byte-equality · macos (pull_request) Successful in 32s
WAI breaking changes and the conformance runner / WAI breaking · wire, record and API against main · linux (pull_request) Successful in 1m22s
joule-moq-room room service / joule-moq-room, every target (pull_request) Successful in 5m41s
WAI conformance / codec wrappers · fuzz smoke, text decode limits, C entry points, provenance, the semantic path (pull_request) Successful in 1m26s
joule-moq-web browser client / joule-moq-web · browser end-to-end (macos) (pull_request) Successful in 12m43s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Has been cancelled
WAI operation catalogue / the catalogue and every door · linux (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux-arm64 (pull_request) Has been cancelled
WAI conformance / faces from keypoints under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
WAI conformance / v2 vocabulary · manifests validate as stated (pull_request) Has been cancelled
WAI conformance / independent verifiers · claims, JWP, key discovery and integer payloads (Python) (pull_request) Has been cancelled
WAI conformance / each feature of the independent verifiers' steps compiles alone (pull_request) Has been cancelled
WAI conformance / delivery telemetry · CMCD and CMSD against an independent library (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux (pull_request) Has been cancelled
WAI conformance / cross-arch byte-equality · linux-arm64 (pull_request) Has been cancelled
WAI conformance / C2PA manifest emission · signed, read back, validated (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux (pull_request) Has been cancelled
WAI energy receipts / energy receipts · linux-arm64 (pull_request) Has been cancelled
WAI examples / WAI examples · portable · linux (pull_request) Has been cancelled
WAI examples / WAI examples · android-app · linux-arm64 (pull_request) Has been cancelled
wai-fleet service / service · linux (pull_request) Has been cancelled
wai-fleet service / service · macos (pull_request) Has been cancelled
wai-ledger service / service · linux (pull_request) Has been cancelled
wai-ledger service / service · macos (pull_request) Has been cancelled
wai-pack / wai-pack · linux (pull_request) Has been cancelled
wai-pack / wai-pack · linux-arm64 (pull_request) Has been cancelled
wai-pack / wai-pack · macos (pull_request) Has been cancelled
wai-pack / wai-pack · independent verifier (Python) (pull_request) Has been cancelled
wai-pack / wai-pack · the floor through a media prober (pull_request) Has been cancelled
wai-pack / wai-pack · dependency licences (pull_request) Has been cancelled
wai-quantum docs, course and locales / every command and snippet in the docs · linux (pull_request) Has been cancelled
wai-quantum docs, course and locales / the course and the command line's languages · linux (pull_request) Has been cancelled
wai-quantum docs, course and locales / the Studio's words in every locale · linux (pull_request) Has been cancelled
wai-quantum for JavaScript / javascript · linux (pull_request) Has been cancelled
wai-quantum studio and desktop / studio · browser (pull_request) Has been cancelled
wai-quantum studio and desktop / desktop app · macos (pull_request) Has been cancelled
wai-quantum studio and desktop / desktop app · linux (pull_request) Has been cancelled
wai-quantum studio and desktop / desktop app · windows (pull_request) Has been cancelled
wai-sink-android native sink library / the JNI layer and the platform-free half on the host JVM · linux-arm64 (pull_request) Has been cancelled
wai-sink-android native sink library / every ABI, the AAR, and the instrumented tests in a headless emulator · macos (pull_request) Has been cancelled
WAI breaking changes and the conformance runner / WAI breaking and conform · their tests, and the independent verifiers through wai conform · linux (pull_request) Has been cancelled
wai-sink-swift native sink package / libwai slices, desktop tests, simulator tests · macos (pull_request) Has been cancelled
WAI Studio / the catalogue's actions, the unit tests and the core · linux (pull_request) Has been cancelled
WAI Studio / Studio in Chromium and Firefox · macos (pull_request) Has been cancelled
WAI Studio / Studio in WebKit · linux (pull_request) Has been cancelled
WAI energy receipts / energy receipts · macos (pull_request) Has been cancelled
wai-web wasm32 / wai-web wasm32 build · corpus, menu and writers (pull_request) Has been cancelled
WAI conformance / quantum core and corpus under wasm32-wasip2 (wasmtime) (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · macos (pull_request) Has been cancelled
standards workspaces build + test / macOS energy backends (pull_request) Has been cancelled
WAI conformance / cargo-class corpora · linux (pull_request) Has been cancelled
WAI examples / WAI examples · the archive, the readiness check, the browser and Apple · macos (pull_request) Has been cancelled
joule-contrib: the SRT encryption test checks the whole payload, not its first byte
`a_wrapped_key_unwraps_under_the_passphrase_only` encrypted 1316 bytes of 0x47 under
a fresh random key and asserted only that the first byte changed: AES-CTR's keystream
byte is 0 one time in 256, so the test failed that often (linux-arm64, on #563's head).
It now asserts the ciphertext differs from the plaintext as a whole.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 13:31:28 -05:00
..
src joule-contrib: the SRT encryption test checks the whole payload, not its first byte 2026-11-01 13:31:28 -05:00
tests SRT tests: count the first sends the proxy dropped, rather than assume a burst's size 2026-10-27 07:27:36 -04:00
Cargo.toml joule-contrib: SRT and RIST contribution over UDP with retransmission 2026-10-25 22:31:09 -04:00
README.md live-contribution: registry, CI, READMEs, RIST's rate bound 2026-10-26 03:05:39 -04:00

joule-contrib

Contribution over UDP with retransmission, for WAI's ingest gateway: SRT (draft-sharabayko-srt-01) and RIST (VSF TR-06-1:2020 Simple Profile, VSF TR-06-2:2024 Main Profile), the MPEG transport stream both carry, and an account of what became of every sequence number. WAI's extensions/live-contribution.md profiles them; joule-moq-ingest uses this crate to bring a contribution link into a room's tracks.

SRT

srt::Listener serves many callers on one UDP port, each connection found by the socket ID its packets name; srt::call calls a listener. Both run the caller-listener handshake of the draft's §4.3.1 (the SYN cookie, the HSv5 extensions, the stream ID, the key material), and live mode (§7.1): every message one packet, TSBPD over the negotiated latency, too-late drop, ACK/ACKACK with the RTT estimate, immediate and periodic NAKs, retransmission, AES-CTR with the key wrapped (RFC 3394) under PBKDF2-HMAC-SHA1. A listener decides each caller through an Admission, which sees the stream ID and gives the passphrase, the role (receive or send) and the latency, or a rejection code.

RIST (feature rist)

rist::RistListener receives one flow: the Simple Profile's RTP on an even port P and RTCP on P + 1, or the Main Profile's GRE-over-UDP tunnel on one port, in reduced overhead mode with the VSF EtherType or the legacy one, keep-alives, and PSK (PBKDF2-HMAC-SHA256 over the GRE nonce, AES-CTR on the GRE sequence number). It takes the first flow whose CNAME is the one it expects, and, under PSK, whose packets decrypt. It requests what is missing with range or bitmask requests, measures the RTT with the RTT echo, and delivers each packet a buffer after it was expected. rist::send is the sender of either profile.

The account

stats::Account records what a receiver did with every sequence number, in order: delivered at the first try, recovered within the window, dropped when its time passed, or outstanding when the link ended; the loss runs, the requests sent and the numbers they named, the retransmissions, duplicates and late arrivals received, the round trips, how long each recovery took and its least margin. It is cut into parts, which the gateway signs as the link record.

The transport stream

ts::Demux reads the PAT and PMT (each section's CRC checked) and reassembles each stream's PES packets, with the PTS extended past 33 bits; a PES missing a packet is dropped whole and counted. ts::Mux writes a program of one video and one audio stream, and ts::Pacer times a stream's chunks by its PCR.

Tools

binary what
joule-contrib-send sends a transport stream file (paced by its PCR) or a synthetic program over SRT (calling or listening) or RIST
joule-contrib-recv receives over SRT or RIST into a file, and prints the link's account
joule-contrib-bench one link on loopback, both ends in the process: the payload rate, CPU time and energy, with a lossy path if asked

URLs: srt://HOST:PORT?streamid=…&passphrase=…&pbkeylen=16&latency=MS (calls; srt://:PORT listens), rist://HOST:PORT?profile=simple|main&cname=…&secret=…&aes-type=128|256&buffer=MS.

Tests

test what
unit tests RFC 3394, RFC 6070 and TR-06-2 Annex B vectors, SP 800-38A's CTR vector; the packet formats; the TR-06-1 Appendix A requests; the TS multiplexer against the demultiplexer, a lost packet, the PTS wrap; the account
srt_link SRT on loopback through a proxy that drops datagrams each way, every payload in order, the account of every sequence number; each key length, a wrong and a missing passphrase, the rejection codes; a packet held for the latency window; a listener that sends to a caller that receives
rist_link the Simple Profile with range and bitmask requests through lossy proxies; the Main Profile in the clear, under PSK of each length and in the legacy format; another CNAME and another passphrase refused
interop (ignored) against each transport's reference tools run locally, named by WAI_SRT_LIVE_TRANSMIT, WAI_RISTSENDER and WAI_RISTRECEIVER: their caller and senders into this crate and this crate into their listener and receivers, byte for byte, encrypted and through lossy paths. With --ignored, a tool not named fails the test

The lossy module's proxy drops, delays and reorders datagrams from a fixed seed.

Patents

VSF TR-06-1:2020 and TR-06-2:2024 each carry an intellectual property notice: a patent is claimed to read on their protocol sections, and its holder has assured the forum that it will license the claims to implementers. The RIST code is therefore built only with the feature rist, which no default build turns on; whether a distributed build carries it is a licensing decision for the distributor (extensions/live-contribution.md §10).

Dependencies

AES, CTR, HMAC, SHA-1 and SHA-256 from RustCrypto (MIT OR Apache-2.0); PBKDF2 (RFC 8018) and AES key wrap (RFC 3394) are written here over them. tokio, serde, serde_json, hex, tracing and rand_core: MIT or Apache-2.0. No C library is linked.

Licence

Apache-2.0.