#facade #git #git-directory #repository #engine #plumbing #git-dir #object-format #round-trip #native-rust

sley

Ergonomic facade over the sley engine, a native-Rust reimplementation of Git's plumbing

16 releases (5 breaking)

Uses new Rust 2024

0.5.2 Jul 29, 2026
0.5.1 Jul 29, 2026
0.4.4 Jul 12, 2026
0.3.1 Jun 27, 2026
0.0.3 Jun 16, 2026

#2524 in Filesystem

Download history 299/week @ 2026-06-14 236/week @ 2026-06-21 689/week @ 2026-06-28 492/week @ 2026-07-05 921/week @ 2026-07-12 542/week @ 2026-07-19 707/week @ 2026-07-26 1653/week @ 2026-08-02

3,869 downloads per month
Used in 25 crates (12 directly)

Apache-2.0

6.5MB
154K SLoC

sley — the embeddable facade over Sley's native Git-equivalent engine.

Downstream code that wants a "just open a repository and read things" entry point should reach for Repository rather than wiring the plumbing crates together by hand. A Repository is a lightweight handle around a resolved git directory: it remembers the git_dir, the common directory (for linked worktrees), and the repository's object format, and hands back the underlying plumbing objects (sley_odb::FileObjectDatabase, sley_refs::FileRefStore, sley_config::GitConfig) on demand.

Embedder surface (feature remote, on by default):

For power users the engine crates are re-exported under plumbing (and the most common types are re-exported at the crate root), so a single git = { path = ... } dependency is enough to reach the whole stack.

use sley::Repository;

let repo = Repository::discover(".")?;
let head = repo.head()?;
if let Some(oid) = head.oid {
    let commit = repo.read_commit(&oid)?;
    let _ = commit.tree;
}

Dependencies

~7–19MB
~306K SLoC