Eight focused crates
The workspace is split into gity, gity-cli, gity-daemon,
gity-watch, gity-git, gity-ipc, gity-storage,
and optional gity-tray. Each crate has a single responsibility; inter-crate boundaries are typed.
Architecture
gity is a Rust workspace with eight focused crates, an async-nng IPC layer, a sled-backed cache, and a scheduler that respects your CPU and battery. Here's the shape of the system.
The workspace is split into gity, gity-cli, gity-daemon,
gity-watch, gity-git, gity-ipc, gity-storage,
and optional gity-tray. Each crate has a single responsibility; inter-crate boundaries are typed.
Lightweight binary messaging over Unix domain sockets (Linux/macOS) and named pipes (Windows). Round-trip latency ~120μs for the CLI channel; ~85μs for the fsmonitor v2 helper, which speaks Git's binary wire protocol directly.
Embedded, pure-Rust transactional key-value store. Holds registration state, fsmonitor cache snapshots,
and rolling metrics. Multi-worktree shared caches use rykv for hot-key replication.
The notify crate wraps FSEvents (macOS), inotify (Linux), and ReadDirectoryChangesW (Windows).
Backpressure, queue-overflow handling, and snapshot management live in gity-watch.
Background prefetch and maintenance pause when system load exceeds a threshold or when on battery. Tasks back off exponentially on failure. Coordinated across all registered repos to avoid thundering herds.
IDEs can subscribe to a stream of structured events (file-changed, prefetch-complete) instead of polling. One nng channel for any number of subscribers; binary serialization, no JSON overhead.
Want the internals?
The codebase is intentionally small (~18,000 LOC) and approachable. Good-first-issue tasks are tagged.