Shared compilation cache for C, C++, Rust and CUDA, stored locally or in the cloud
open sourceApache-2.0self-hostablefree
sccache is a ccache-like compiler wrapper from Mozilla that avoids recompilation by caching results on local disk or in remote storage. It supports C/C++, Rust, assembler and CUDA (nvcc and clang). Storage backends include S3, R2, Redis, Memcached, GCS, Azure, GitHub Actions cache, WebDAV and others, with multi-level caching, and it also offers icecream-style distributed compilation.
Ways to install
Package managers
Problems it solves
- our CI recompiles the same C++ and Rust code on every single run
- share compiled objects between developers and CI machines through a cloud bucket
- set RUSTC_WRAPPER to something that skips compiling crates that haven't changed
- clean builds of our big Rust workspace take 20 minutes
- cache compiler output in Redis or S3 so ephemeral runners start warm
- distribute C++ compilation across a few beefy machines
- speed up GitHub Actions Rust builds using the Actions cache
- cache CUDA compilation results
- Docker builds in CI keep starting from zero compile time
Features
- local disk cache
- S3/R2/GCS/Azure/Redis/Memcached/WebDAV backends
- GitHub Actions cache backend
- multi-level cache
- icecream-style distributed compilation
- Rust, C/C++, CUDA support
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what sccache does.
- Kache Build once. Reuse the work.
- Mr Boxington (mbx) A shared cache for Cargo builds
- ccache Compiler cache that speeds up C and C++ rebuilds
- Swatinem/rust-cache A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults.
- cargo-chef Cache the dependencies of your Rust project and speed up your Docker builds.
- BuildBuddy Open source Bazel build event viewer, result store, remote cache, and remote build execution platform.
