kache 0.23.0

Zero-copy, content-addressed build cache for Rust, C/C++ and more, with S3 and shared-filesystem remotes.
---
title: Kache
description: A local-first compiler cache for Rust and C/C++ builds
---

Kache stores compiler outputs by content and reuses them across builds, repositories, and worktrees. The local cache works on its own. S3-compatible and filesystem remotes are optional.

## Get started

Install Kache:

```bash
cargo install kache
```

Then enable it:

```bash
kache init
```

That's it. Keep running `cargo build` as usual; Kache now caches the compiler outputs.

`kache init` sets Cargo's `rustc-wrapper` and installs a login service for the background cache. It asks before each change and backs up files it edits.

[Other install methods](/docs/getting-started/installation) include Homebrew, APT, winget, and Nix. The [quick start](/docs/getting-started/quick-start) shows how to confirm cache hits. Comparing compiler caches? Read [Kache or sccache?](/docs/getting-started/comparison).

## Current support

| Area | Support |
| --- | --- |
| Rust libraries and build scripts | Linux, macOS, and Windows |
| Rust executables | Enabled by default on Linux and macOS; disabled by default on Windows |
| C and C++ object compilation | GCC, Clang, Apple Clang, and MSVC-compatible invocations that Kache can model safely |
| Local cache | Content-addressed storage with automatic garbage collection |
| Remote cache | S3-compatible and filesystem backends |
| Build visibility | Live monitor, stats, miss explanations, and reports |

Kache passes unsupported compiler invocations through unchanged. A passthrough is not a cache hit or miss; inspect its reason in the monitor's Why tab or debug logs.

## Tested nightly on real projects

The [nightly benchmark workflow](https://github.com/kunobi-ninja/kache/actions/workflows/bench.yml) runs cold/warm builds of Firefox, LLVM, Substrate, SurrealDB, Lance, OpenDAL, and eza, including Firefox runs on Linux and Windows and a side-by-side sccache run. Reports, traces, and logs are retained for 30 days.

Benchmark numbers count only when the individual job succeeds and its self-checking verdict is `ok`.

## Go further

<Cards>
  <Card title="Install" href="/docs/getting-started/installation">
    Packages, binaries, source builds, and platform notes.
  </Card>
  <Card title="Quick start" href="/docs/getting-started/quick-start">
    Enable Kache for a project or across Cargo builds.
  </Card>
  <Card title="C and C++" href="/docs/getting-started/c-cpp">
    PATH shims for Make and PKGBUILD, and what is cached.
  </Card>
  <Card title="Remote cache" href="/docs/remote-cache/s3-setup">
    Share entries through S3-compatible or filesystem storage.
  </Card>
  <Card title="Command reference" href="/docs/commands/reference">
    Exact commands and common flags.
  </Card>
  <Card title="How it works" href="/docs/how-it-works/architecture">
    Cache keys, storage, daemon behavior, and correctness boundaries.
  </Card>
  <Card title="Benchmarks" href="/docs/benchmarks">
    Nightly real-project runs, local scenarios, reports, and traces.
  </Card>
</Cards>

## Feedback

If Kache behaves differently from these docs, [open a bug report](https://github.com/kunobi-ninja/kache/issues/new?template=bug_report.md). For a missing compiler, remote backend, or workflow, [open a feature request](https://github.com/kunobi-ninja/kache/issues/new?template=feature_request.md).