Grit Rust library rewrites Git, passes 99.3% of test suite
Grit has reached 99.3% of Git’s 42,001 in-scope tests, a big step toward a memory-safe Rust Git library people can embed instead of shell out to.

Scott Chacon’s Grit is getting uncomfortably close to the point where Rust developers can treat Git as infrastructure, not just a command-line program. The agent-driven reimplementation now passes 99.3% of Git’s test suite, or 41,715 of 42,001 in-scope tests, and that number matters because it points to a library that can behave close enough to upstream Git to be built into other tools.
Grit is being built as a library-first, memory-safe rewrite of Git in Rust, with a separate CLI layered on top. The CLI already implements more than 140 Git commands, while grit-lib covers the core machinery behind objects, packs, index, refs, revisions, diff, merge, config, ignore rules, hooks and more. In Chacon’s telling, that split is the whole point: after a 15-year desire for a real reentrant, linkable Git library, the project is trying to replace the old fork-and-exec wrapper model with something embeddable and composable.

The progress is especially striking because Git’s own test corpus is enormous. Chacon said it spans more than 42,000 tests across more than 1,400 scripts, giving Grit a historically tough benchmark for any compatibility effort, let alone one written in Rust. The project’s dashboard breaks that work down by family, including basics, database, worktree, ls-files, diff, fetch/push, revisions, porcelain, forensics and tools, which is the kind of granular coverage Rust toolchain folks tend to appreciate when they are deciding whether a new core dependency is ready.
Chacon said the project was developed over the last few months, on and off, using a swarm of AI agents, and that it was inspired by Anthropic’s agent experiment that built a C compiler. Grit now has more than 7,300 commits in the gitbutlerapp/grit repository, and the project is backed by GitButler. grit-lib is MIT licensed, while the CLI is split under GPL, with pre-built binaries available for macOS, Linux and Windows.
Chacon is also careful not to oversell the win. Grit has not yet been proven in real-world use, and he warned it could still do the wrong thing or even corrupt data. That caution is exactly why the 99.3% figure lands so hard: it is not just a score, it is a sign that a memory-safe Rust Git implementation is moving from demo territory toward something the rest of the ecosystem might actually build on.
This article was produced by Prism’s automated news system from verified source data, official records, and press releases, then run through automated quality and moderation checks before publishing. The system is built and supervised by the people who set the standards it runs under. Read our full AI policy.
Did this article answer your question?


