Artifact 54ee3e8f159f0869c2d6361d1692576e3d1acdf2c66f7fc897c9fe0e54b09adc:
- File README.md — part of check-in [a82aedc9df] at 2026-07-08 22:45:07 on branch trunk — Say the RFCs, not fossil, are the source of expected test values (user: dmestas, size: 1909) [annotate] [blame] [check-ins using]
zit
A Fossil version-control system implemented in Zig — a direct port of the Fossil formats and protocol from their specifications.
zit is driven by four companion Internet-Drafts (the frozen reference finals
are in docs/rfcs/):
| Module | RFC | What it specifies |
|---|---|---|
delta |
draft-fossil-delta-format-00 |
byte-level delta encoding |
artifact |
draft-fossil-artifact-format-00 |
manifest / control-artifact card format, naming, checksums |
repostate |
draft-fossil-repo-state-00 |
derived branch / tag / leaf / current-trunk views |
sync |
draft-fossil-sync-protocol-00 |
HTTP sync / clone protocol |
Implementation follows the RFC dependency layering:
delta -> artifact -> repostate -> sync
Scope
zit targets the version-control substrate: the check-in (manifest), cluster, and tag/control artifact types. The collaboration types (wiki, ticket, forum, attachment, technote) are carried opaquely — stored and transported by hash, but not interpreted.
Build
Requires Zig 0.16+.
zig build # build the `zit` binary into zig-out/bin/
zig build run -- version
zig build test # run unit tests
Status
Scaffold. Implemented so far:
delta: base-64 integer codec (MSB-first) and the checksum (mod 2³²), each with RFC-derived test vectors.artifact: artifact naming (SHA-1 / SHA3-256, lowercase hex) and the Z-card MD5, with the RFC's own example vectors as tests.
Everything else is stubbed against its RFC section. Work proceeds test-first, one RFC rule at a time, with expected values taken from the specifications and their worked examples.
Source control
This project is itself under Fossil. The repository lives in .zit.fossil
(ignored); open a checkout with fossil open --keep .zit.fossil.