Skip to content

Introduction

kache is a RUSTC_WRAPPER that caches compiled Rust artifacts. On a cache hit, it restores files via hardlinks — no copies, no re-reads — and skips compilation entirely. On a miss, it compiles normally and stores the result for next time.

It works locally out of the box. Add an S3-compatible bucket and a background daemon to share the cache across machines and CI runners.

# install
mise use -g github:kunobi-ninja/kache@latest

# enable
export RUSTC_WRAPPER=kache

# or persist in ~/.cargo/config.toml:
# [build]
# rustc-wrapper = "kache"

That's all cargo needs to start using kache. The first build populates the cache; subsequent builds — on the same machine or any other with access to the same remote — skip compilation for unchanged crates.

On this page