Introduction
kache is a drop-in RUSTC_WRAPPER that caches Rust compilation artifacts. Cache keys are blake3 hashes of normalized rustc invocations; cache hits restore via hardlinks, and identical blobs are stored once and shared. Optional S3 sync (AWS, Ceph, MinIO, R2) shares the cache across machines.
Local caching and direct S3 sync are stable today.
SOON: a remote planner that prefetches from workspace manifests, dependency history, and build intent — warming the right artifacts before rustc asks for them. See Remote service.

Cold compile populates kache's store,
cargo cleanwipestarget/, and the second build pulls every artifact back via hardlinks.
Why local kache is fast
kache is useful even before remote cache is configured:
- Hardlinked restores. Local hits are restored with hardlinks into
target/, so artifact bytes are not copied. - Content-addressed storage. The store is keyed by blake3 hash, so identical artifact blobs are stored once and linked many times.
- Compile-then-record on misses. Misses compile normally, then kache records the outputs for future builds.
- Daemon-optional locally. If the daemon is not running, local hits and misses still work; remote checks, uploads, and prefetching degrade gracefully.
- Safer on macOS. Incremental compilation is disabled while kache wraps rustc — artifact caching replaces that path and avoids APFS-related corruption.
Try it
# install
mise use -g github:kunobi-ninja/kache@latest
# interactive setup: cargo wrapper + login service + daemon start
kache init
# verify
kache doctor
kache init is idempotent — re-run it any time to repair configuration. Prefer to wire things by hand? Just export RUSTC_WRAPPER=kache or set rustc-wrapper = "kache" under [build] in ~/.cargo/config.toml.
Architecture in one screen
- Wrapper —
RUSTC_WRAPPERintercepts rustc calls, computes blake3 cache keys, restores hits via hardlinks. - Daemon — background process handles async S3 uploads, remote checks, and prefetch. Auto-restarts on binary update.
- Store — SQLite index plus content-addressed blobs under
{cache_dir}/store/; hits hardlink those blobs intotarget/. - Cache keys — deterministic blake3 hash of rustc version, crate name, source, dependencies, and normalized flags — portable across machines.
Installation
mise, cargo-binstall, or build from source
Quick start
kache init, first build, verifying hits
How it works
Wrapper, store, daemon — the full picture
Cache key
What's hashed and why keys are portable
Remote cache (S3)
AWS, R2, Ceph, MinIO — same config
CI setup
GitHub Actions one-liner via kache-action
Monitor
Live TUI dashboard for builds, store, transfers
Commands
Every CLI subcommand with flags and examples