Skip to content
>_ kunobi-kache
C/C++ + CUDA supported
Ferris, the unofficial Rust mascot

kache init, then Cargo, CMake, Make, or Ninja

Compiler caching for Rust, C/C++, and CUDA. Keep running Cargo, Make, CMake, or Ninja after setup, locally and in CI on Linux, macOS, and Windows.

kache initthen cargo as usual
Rust · C/C++ · CUDAgcc · clang · clang-cl · nvcc
macOS · Linux · Windowsx86_64 + ARM
>_ quick-start

Install. Init. Build.

Choose an install method, run kache init once, then keep using Cargo, Make, CMake, or Ninja.

01 · install
Install method
02 · init
run once (recommended)
$kache init

Using scripts or CI? kache init -y runs the same setup without prompts.

check the configuration
$kache doctor
Done. Keep using Cargo, Make, CMake, or Ninja as usual.
03 · ci · github actionsOne line carries the cache into your workflow.
$- uses: kunobi-ninja/kache-action@v1
04 · c/c++kache init adds compiler shims to PATH. To set it up by hand, create the shims and put their directory first.
$kache install-shims && export PATH="$HOME/.local/lib/kache/shims:$PATH"
>_ the-problem

The same compile, over and over

target/ everywhere

Every worktree gets its own target/. The same .rlib materializes over and over until your disk fills with duplicated build output.

sccache wants a server

sccache is a client-server cache. kache is local-first: entries share across worktrees without a remote, and you keep calling cargo.

CI repeats the same work

Every job rebuilds the same dependency tree. One GitHub Action line keeps the cache between runs, with or without an S3 bucket.

>_ how-it-works

kache init. Then cargo.

init writes rustc-wrapper. After that, cargo build, test, and clippy are unchanged. The store is local-first. Remotes are optional.

step . 01
Wrap
kache init, then cargo as usual
step . 02
Hash
blake3 key from normalized compiler inputs
step . 03
Store
content-addressed blobs, reused across worktrees
step . 04
Sync
optional S3 or filesystem remote
keep using cargoworktree sharing without a remotedaemon optional for local
>_ coverage

What's supported

Rust

Libraries and build scripts on Linux, macOS, and Windows. Executables on Linux and macOS by default; off on Windows until you turn them on.

C, C++, and CUDA

Single-source object compiles through GCC, Clang, Apple Clang, clang-cl, and nvcc. Unsupported invocations pass through unchanged.

macOS, Linux, Windows

Release binaries for x86_64 and ARM. Linux musl, macOS, Windows MSVC.

Remotes

S3-compatible and filesystem remotes share Rust, C/C++, and CUDA entries. clang-cl debug objects stay on the machine.

>_ surface-area

A compact CLI built around the cache

More than a wrapper: monitor, config, and doctor make it usable day to day.

$kache init[-y]

Write rustc-wrapper and optionally install the daemon

$kache doctor[--fix]

Diagnose setup; --fix migrates from sccache

$kache monitor

Live TUI dashboard for build events and cache stats

$kache stats

Non-interactive cache stats summary

$kache list[<crate>]

List cached entries, or details for a specific crate

runkache --helpfor the full command surface.
>_ nightly-bench

Charts soon

Benchmarks run on every pull request and every night. Charts land on this page once the numbers hold steady, rather than after a one-off run.

cold

Empty cache, empty build directory

warm

Same checkout, or a fresh checkout at the same revision

next commit

Rebuild after moving to the following commit

contention

Six Cargo jobs sharing one cache

storage

Disk taken by the cache and build output

perf gate

Every pull request against its merge base

  • Firefox · Linux + Windows · vs sccache
  • LLVM
  • SurrealDB
  • Lance
  • OpenDAL
  • eza

Install once. Keep using cargo.

Free, open source, Apache-2.0. Rust, C/C++, and CUDA on Linux, macOS, and Windows.

Available for:
Apple macOS logomacOSMicrosoft Windows logoWindowsLinux logoLinux

>_ apache-2.0 · open source

Feedback and contributions welcome

We read every issue. A miss you cannot explain, a toolchain we do not cover yet, a benchmark that disagrees with ours: open one with the repro and it lands in front of the people who wrote the code.

900Stars
v0.26.0Latest release
todayLast commit

kunobi-ninja/kache · pull requests welcome, including the first one

Available for:
Apple macOS logomacOSMicrosoft Windows logoWindowsLinux logoLinux
Download Kunobi