stream
A Zig implementation of jetstream — the full-network archive and streaming service for atproto, designed and written by Jim Calabro. The archival design is Jetstream V2's; this port carries it to Zig, built on zat.
A live instance runs at 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.
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 sealedjsssegments byte-compatible with upstream. A working consumer (plan → fetch → decode → sqlite) isexamples/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/metricson the debug listener
The full implemented surface is in
docs/feature-surface.md. Stream targets semantic
parity with the Jetstream V2 revision in the upstream harness;
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).
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.
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.
Release admission and rollback are documented in docs/deploying.md.
docs
docs/ covers architecture, configuration, testing, and operations.