# stream A Zig implementation of [jetstream](https://github.com/bluesky-social/jetstream) — the full-network archive and streaming service for atproto, designed and written by [Jim Calabro](https://calabro.io). The archival design is Jetstream V2's; this port carries it to Zig, built on [zat](https://tangled.org/zat.dev/zat). A live instance runs at **[stream.waow.tech](https://stream.waow.tech)** — Jetstream V2-compatible feeds with the whole network archived behind them (sealed segments back to seq 1). See the live `/status` page for archive size and relay progress. Consumer docs, including endpoints and cursor semantics, are at [stream.waow.tech/llms.txt](https://stream.waow.tech/llms.txt). ## what it does - **live feeds**: `/subscribe` (Jetstream v1-compatible JSON) and `/xrpc/network.bsky.jetstream.subscribeEvents` (proposal-0015 lexicon frames, sequence cursors), with collection/DID filters, cursor replay, and zstd - **the archive**: `listSegments`, `getSegment`, `getBlock`, `planSnapshot` — gap-free recovery over sealed `jss` segments byte-compatible with upstream. A working consumer (plan → fetch → decode → sqlite) is [`examples/backfill-collection-sqlite.py`](examples/backfill-collection-sqlite.py); best suited to dense collections and bulk drains (block-granular retrieval) - **whole-network bootstrap** with concurrent live capture, deterministic merge, and crash-safe resume - **Sync 1.1 commit verification** and continuing repair of repositories that were unavailable or changed during bootstrap - **operations views** at `/status`, Prometheus `/metrics` on the debug listener The full implemented surface is in [`docs/feature-surface.md`](docs/feature-surface.md). Stream targets semantic parity with the Jetstream V2 revision in [the upstream harness](docs/upstream-harness.md); [`docs/semantic-parity.md`](docs/semantic-parity.md) is the authority on what is proved, row by row, and no claim here overrides it. ## develop Use Zig **0.17.1** (also pinned in CI and the release image). ```sh zig build test && zig build # unit tests + exe just simulator # local fake atproto network on :7777 just run-sim # stream against it ``` Suites, oracles, and the power-loss tier: [`docs/testing.md`](docs/testing.md). Native dependencies are pinned by URL and content hash and built from source. The Linux runtime image supplies CA certificates and libcurl for telemetry. Production targets `x86_64-linux-gnu` in `ReleaseSafe` mode. Build-target checks and WebAssembly limitations are recorded in [docs/build-targets.md](docs/build-targets.md). Release admission and rollback are documented in [docs/deploying.md](docs/deploying.md). ## docs [docs/](docs/) covers architecture, configuration, testing, and operations.