Files
DomiStream/CLAUDE.md
T

2.8 KiB

DomiStream (public, CPAL-1.0)

Pure, sans-I/O Rust protocol code for Arena Domi's Play remotely. Arena Domi (private) and Arena Domi TV (private, ArenaTV) depend on it by git tag (stream-v<x.y.z>).

Play remotely

Arena Domi streams games from the user's PC to Arena Domi TV, phones and other PCs, at home or away over Via Domi. Days 1-2 wrap Sunshine; from Day 3 the engine is Lumen (own Rust code). Roadmap: docs/ROADMAP-REMOTE.md (Days 1-7).

Rules that never bend

  • Clean room: never open, paste or port GPL code (Sunshine, Moonlight, Apollo, Vibeshine, Rubylight, moonlight-common-c) into Domi repos. Allowed sources: Wolf protocol docs, Moonshine (BSD-2, attribute), our own measurements.
  • Also allowed for the wire format, with attribution (Mark, 2026-11-25): stock ENet (MIT), tokio-enet (BSD-2), fec-rs (BSD-2). GPL code stays off limits.
  • Sunshine is never patched, linked or bundled: official release, sha256-pinned, separate program, local API only.
  • Sunshine and Lumen listen only on the Via Domi interface and loopback (home LAN only when Via isn't installed).
  • Every device must hold a Tessera identity with a grant from the PC's owner. No PIN shown to the user, ever.
  • Anything from the network is hostile input: strict parsing, size caps, fuzzed decoders of every packet type.
  • Downloads (Sunshine release) and every remote session start/stop go through fundamentum.audit.record.
  • Measure, don't guess: every latency claim in docs or UI comes from the harness (from Day 2).
  • Three clicks max; plain English labels; Latin only in brand names (Arena Domi, Lumen, Via Domi).

Rules for this repo

  • Sans-I/O: no std::net, no std::time::Instant::now/SystemTime::now, no threads, no files. Time comes in as an argument. Randomness comes in through a caller-supplied source, so tests are deterministic.
  • #![forbid(unsafe_code)] in every crate. No panics on any input: every parser returns Result, caps every length before it allocates, and is fuzzed.
  • Tests first for every parser, the FEC, the pairing state machine and the crypto framing.
  • Tests never use real networks or real keys (fixed test keys generated in the test, never a real host's).
  • Commits: [<crate>] <Feature>: <description>, [repo] for repo-wide changes. No AI attribution in commits, PRs or tags.
  • No binaries, captures or test videos in git.
  • Cargo builds: the machine-wide CARGO_HOME config sends the build dir to D:\cargo-build. Never set CARGO_TARGET_DIR.
  • Never start a build or a test run (cargo, npm/pnpm, Gradle, dotnet, Playwright, e2e, emulator, Fabrica runs) while this PC's CPU, RAM, or any drive the work writes to (D:, E:, F:) is more than 90 % used (Mark, 2026-11-25: "CPU, RAM and disk all 90%"). Check first. If any is above 90 %, don't start; wait and check again later. Don't stop other sessions' work to make room.