Skip to content
zit zit 0.1.0
Login

zit 0.1.0

zit is Fossil's formats and sync protocol reimplemented in Zig from four companion Internet-Drafts (frozen in docs/rfcs/). It is a library first — the delta codec, the artifact formats, the derived repository state, and the HTTP sync protocol as an embeddable API — with a thin CLI over the top. This first tagged release is a working version-control substrate. It is honest about what it does not yet do; the limitations below are deliberate, not bugs.

What's implemented

No module touches ambient time, randomness, filesystem, or network directly; effects arrive through injected interfaces, so the whole stack replays exactly under seeded deterministic simulation.

What the conformance claim rests on

The drafts are the authority, not Fossil's source: test expectations come from the spec text and its worked examples, and every normative clause a module implements gets a test citing its section. That keeps the claim honest against the spec — but a spec can be misread, so one step checks against the reference implementation.

That step is zig build smoke. It drives the real fossil binary, and CI runs it on every push; it is the only step that proves conformance against Fossil itself rather than against our own reading of the RFCs. A disagreement there means either zit misread the spec or the spec is wrong — the spec gets an erratum, never the code a workaround.

The exact fossil that smoke passed against matters, so name it. Locally that is:

fossil 2.28 [52445a27f1] (2026-03-11)

The CI runner installs whatever its package source ships, which lags the local 2.28. The workflow prints fossil version for that reason (readiness item S7). The runner's version at the tagged commit must be read from that CI log and recorded here before shipping — do not assume it equals 2.28.

What's deliberately deferred, and where it's documented

Storage

zit pack performs an at-rest re-deltification pass — fossil-style best-of-N delta-base selection plus a monotonic-shrink guard that keeps the smaller of an existing frame and its re-encoding, so repacking a clone of fossil-quality wire deltas is a net win rather than a regression. It is at-rest only: all four RFCs stay conformant and wire interop is preserved, and every repacked frame is hash-verified against the log.

Measured whole-file, index-inclusive, in commit bab9303056:

Repository Before pack After pack Versus fossil
sqlite 207.3 MB (1.40x) 174.4 MB (1.18x) fossil 147.7 MB
fossil-scm 117.5 MB (1.63x) 108.1 MB (1.50x) fossil 72.2 MB

Build

Requires Zig 0.16+.

zig build            # build the zit binary into zig-out/bin/
zig build test       # unit tests
zig build smoke      # interop check against a fossil binary on PATH