Kache: Zero-copy, content-addressed Rust build cache

Hi Zcash community!

I wanted to share an open source project we’ve been working on recently that I think could be useful for the Zcash dev community. It’s called kache, a build cache for Rust. we’ve been using it internally for a while now.

It works like sccache if you’ve used that, a RUSTC_WRAPPER you drop in, but cache hits restore into target/ as hardlinks instead of copying files around, and the store is content-addressed with blake3 so identical artifacts only get stored once. there’s optional S3 sync (MinIO, Ceph, R2, AWS) if you want to share the cache across a team or CI.

we just put out v0.5, and a lot of recent work has gone into making cache keys portable across checkouts and machines (path normalization, remap-path-prefix, configurable salt), which is the part that actually matters when you’re sharing a cache between CI runners.

Since a lot of you are building zebra or other heavy Rust workspaces, I figured this might save you some of the same pain it saved us. it’s Apache-2.0 and still young. one thing worth knowing up front: it turns off incremental compilation while it wraps rustc, which is a deliberate tradeoff. if you already run sccache, kache doctor --fix will migrate you over.

Repo is here: https://github.com/kunobi-ninja/kache
https://crates.io/crates/kache

Would love for people to try it.
**
Install**

# mise (recommended)
mise use -g github:kunobi-ninja/kache@latest

# cargo (build from source)
cargo install kache

# cargo-binstall (downloads pre-built binary, requires cargo-binstall)
cargo binstall kache

Quick start

# Interactive setup: configures ~/.cargo/config.toml, installs the
# background daemon as a login service, and starts it.
kache init

# Or accept all defaults non-interactively:
kache init -y

# Verify with:
kache doctor
2 Likes

It is great when you work a lot with LLMs…
Kache saves a lot of storage.. A huge pain when dealing with a large amount of rust-based git worktrees!