atproto relay in zig zlay.waow.tech
relay zig atproto
Something went wrong. Try again.
zlay #
AT Protocol relay in zig 0.17. reader per PDS + shared frame processing
pool, written against std.Io — backend selected at build time
(-Dbackend=zio for production, Io.Threaded default). ReleaseSafe in
production. see docs/design.md for the threading and backend model.
before pushing #
zig fmt --check .andzig build test- production is
-Dtarget=x86_64-linux-gnu(glibc malloc's per-thread arenas + page-return are load-bearing for RSS under the Threaded fallback's ~2,800 threads). the "musl breaks RocksDB" belief is retired — musl builds and runs SIGILL-free on 0.16 — but mimalloc (the only static-musl allocator we found viable) leaks under our thread model, so prod stays glibc. see docs/musl-investigation.md - ReleaseFast has a known double-free — do not use
- under zio a fiber that never yields owns the scheduler — no busy loops, no sub-ms sleep spins
deploy #
configs at ../@zzstoatzz.io/relay/ — just zlay publish-remote ReleaseSafe <ref> zio
KUBECONFIG is set automatically by the zlay module (zlay/kubeconfig.yaml).
see docs/deployment.md for build flags, rollback, and zio triage/forensics discipline.
docs #
- docs/design.md — architecture, threading, memory model
- docs/deployment.md — build flags, infra, resource usage
- docs/gotchas.md — zig/pg.zig/rocksdb-zig/deploy traps
- docs/incident-2026-03-04.md — ReleaseSafe RSS analysis
- docs/evented-attempt.md — Evented backend attempt and why we reverted
- docs/handoffs/ — dated engineering handoffs (zio adoption arc: 2026-08-03/04/05)