| Artifact ID: | de5f0343aa587ef0151e08bd84814b3cb652ef3ac5f0a46581e24f72a2588efb |
|---|---|
| Page Name: | Home |
| Date: | 2026-10-23 00:12:54 |
| Original User: | dmestas |
| Mimetype: | text/x-markdown |
| Parent: | 3c9fa8f178a2aa01a7a70f2b6dc94bbe66f71fb79b4cfd7b619e159758869787 (diff) |
| Next | ff5bb3b129cdf2cebcb2151389761a6ff7ae8350f884141acc99403f641cc41d |
zit
A Fossil version-control system in Zig.
zit reads and writes Fossil's artifacts and speaks Fossil's sync protocol,
so it clones from, pushes to, pulls from, and serves stock fossil, and a
checkout means the same thing to both tools. It is written from the
specifications, not ported from C: six Internet-Drafts frozen in this
repository are the authority, and Fossil itself appears only in the
differential tests that hold the two implementations to the same answer.
The zit binary is a thin command over a library — a Zig counterpart to
libfossil — whose modules take no ambient time, randomness, filesystem, or
network, so the whole stack runs under seeded deterministic simulation.
Download
Download Zit 0.6.5 for macOS ARM64 or Linux x86-64/ARM64, or get the source archive, or read the release notes.
Releases are also mirrored to GitHub.
What it does
The everyday verbs — init, add, commit, update, merge, diff,
status, timeline, branch, tag, annotate, grep, bisect,
stash, undo/redo, clone, push, pull, sync, serve — with
Fossil's output shapes and Fossil's settings: .fossil-settings/ is read
at every tier, ignore-glob, clean-glob, manifest, and the rest mean
what they mean in Fossil.
Beyond that:
- Git in both directions —
import-gitandexport-git. - Sub-manifests — bounded per-commit manifest size for wide
repositories (
submanifest analyze/enable). Off by default; a repository that turns them on is no longer readable by stock Fossil, and sync refuses to hand such artifacts to a peer that would misread them. - Sparse cones — partial worktrees (
open --cone,cone). - Indexer feeds —
framesandcrosslinkstream raw artifacts and derived per-check-in records from a cursor, for a forge or search index. - Store care —
verify,pack,purge,shun, and a local rebuildcheckpointthat keeps cache-cold opens fast on large histories. - Sync at Fossil's scale — clusters are indexed, announced bounded, and minted at Fossil's own thresholds, so a no-op pull of a million-artifact repository sends kilobytes, not the whole inventory; clone streams to disk as it arrives.
- A write plane for forges — the machine verbs
wiki,ticket,forum,technote, andattachauthor Fossil's collaboration artifacts,landingproposes and lands a branch as an ordinary forum thread, andattach listreads attachments back. Each is one line of stdout, exact exit codes, and works against a bare store with-R— the seam quarry writes through. - Signed check-ins —
commit --signclearsigns the manifest through Fossil's ownpgp-commandcontract, and the signature survives pack, verify, and sync byte-exact.
What it leaves to Fossil
By decision, not omission. zit authors and syncs the collaboration
artifacts but renders none of them: the web UI belongs to a forge
(zit ui hands off to one that serves the repository), and wiki, tickets,
forum threads, and technotes are read there rather than here. There is no
unversioned-file store; a peer's unversioned files are declined visibly.
zit never creates a SHA-1 repository, though it reads one.
The specifications
The drafts under docs/rfcs are the sole authority. Expected values in tests come from the spec text and its worked examples. Corrections are folded into the draft texts and listed in their Changes appendices; the retired erratum files remain in repository history.
| Layer | Draft | Specifies |
|---|---|---|
delta |
draft-fossil-delta-format-00 | byte-level delta encoding: copy/literal segments, base-64 integers, mod-2³² checksum |
artifact |
draft-fossil-artifact-format-00 | card-structured manifests and control artifacts, content addressing (SHA-1 / SHA3-256), checksums |
repostate |
draft-fossil-repo-state-00 | branch, tag, and leaf state derived from the append-only artifact set |
submanifest |
draft-fossil-submanifests-00 | S-card tree manifests: bounded per-commit manifest size for wide repositories |
sync |
draft-fossil-sync-protocol-00 | HTTP replication of the artifact set between repositories |
cone |
draft-fossil-sparse-cone-00 | sparse cones: partial worktrees and the sparse-store path for monorepos |
Building
Requires the pinned Zig 0.17.0 toolchain.
zig build --release=fast # the shipped binary, at zig-out/bin/zit
zig-out/bin/zit version
zig build test # unit tests, one cited test per RFC clause
zig build smoke # interop check against a fossil binary on PATH
--release=fast is what the release builds use; a plain zig build is a
Debug binary, many times slower on a real history.
Finding your way
- Timeline — current activity and history
- Source tree — browse the code at trunk
- README — design notes, scope, and build steps
- Release notes — every release, oldest to newest
- Technotes — engineering notes on how and why things changed
- docs/rfcs — the six frozen drafts
- GitHub mirror — issues and CI