zitchat
zitchat is a BitChat mesh server and protocol library written in pure Zig.
No C. No third-party dependencies. No runtime heap growth in the core path. Fixed tables, fixed queues, arenas, asserted bounds. Windows and Linux.
get started
You need Zig 0.16.
git clone https://github.com/aphexddb/zitchat.git
cd zitchat
zig build
./zig-out/bin/zitchat serve alice "hello world"
That's the whole thing. Run it next to a phone running BitChat and it joins the mesh.
how we know it works
Unit tests are necessary and not sufficient. Protocol codecs are fuzzed at the decoder edge: generate a valid frame, mutate it, assert we never panic and never accept garbage we claimed to reject.
Beyond that, deterministic simulation testing (DST). Hundreds of virtual phones on a virtual BLE radio. Loss, duplication, corruption, truncation, disconnect storms, address rotation. Virtual time so a ten-minute mesh run finishes in seconds. Every run is a seed. If a simulation fails, you simply replay that seed and fix the bug.
zig build test
zig build fuzz -- smoke
zig build dst -- --seed 42