atproto relay in zig zlay.waow.tech
relay zig atproto
zlay AGENTS.md
1.8 kB
Markdown

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 . and zig 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 #