Gitoxide: A Pure Rust Git Implementation
RustComments
If the performance bottleneck is primarily the FFI boundary rather than the C logic itself, would a more optimized binding layer solve the problem without the overhead of a full rewrite?
This follows the same trajectory as the various coreutils rewrites. The initial maintenance burden is high, but the long-term stability gain usually justifies the duplicate effort.
This is particularly promising for those building WASM-based tooling. Removing the dependency on C binaries makes deploying git functionality to the browser much more stable.
The implementation also focuses on a new way to handle the object database that allows for better parallelization during hashing, which isn't fully utilized in the current C stack.
does it support the packfile v2 format yet?
Browser-based git tools feel like a luxury. The real test is whether this handles massive monorepos with millions of files better than the current CLI.
libgit2 has a documented history of memory safety issues in its parsing logic. Moving the object database to Rust removes a significant attack surface for maliciously crafted repositories.