This is a Vercel-maintained fork of mozilla/sccache. It is maintained as a linear stack of patches (one commit = one feature) on top of the upstream main branch.
For full upstream documentation, see the upstream README or the upstream repository.
Each patch is a single commit. Generate the current patch list with:
git log --oneline upstream/main..HEAD
Current patches (oldest first):
-
Multi-level caching with automatic backfill — Cherry-picked from upstream mozilla/sccache#2581. Adds hierarchical cache storage (e.g., disk -> redis -> s3) with configurable write tolerance policies and automatic backfill from slower tiers. Drop this patch once the PR is merged upstream.
-
Allow caching all Rust crate types via
SCCACHE_RUST_CRATE_TYPE_ALLOW_HASH— Vercel-originated patch. When this env var is set, all crate types (bin, dylib, cdylib, proc-macro) become cacheable. The env var value is hashed into the cache key only when unsupported crate types are present, so machines with different linker setups get separate cache entries. -
Upgrade opendal + Vercel Artifacts cache backend — Upgrades opendal to mmastrac/opendal vercel_opts branch via
[patch.crates-io](apache/opendal#7334). Addslayers-loggingfeature andaws-lc-sys/prebuilt-nasm. Adds Vercel Artifacts cache backend configured viaSCCACHE_VERCEL_ARTIFACTS_TOKEN, plus optionalSCCACHE_VERCEL_ARTIFACTS_ENDPOINT,SCCACHE_VERCEL_ARTIFACTS_TEAM_ID,SCCACHE_VERCEL_ARTIFACTS_TEAM_SLUG. Once the upstream opendal PR merges, switch the patch toapache/opendalmain. Drop the patch entirely once opendal publishes a release with these changes. -
This README + CI/release workflows — Fork documentation, CI test workflow, and release workflow.
Use git diff-tree --no-commit-id --name-status -r <commit> to verify each patch only touches expected files.
Patch 1 — multi-level caching:
M README.md M docs/Configuration.md A docs/MultiLevel.md M src/cache/cache.rs M src/cache/disk.rs M src/cache/mod.rs A src/cache/multilevel.rs A src/cache/multilevel_test.rs M src/cache/readonly.rs M src/compiler/preprocessor_cache.rs M src/config.rs M src/server.rs M tests/harness/mod.rs M tests/integration/Makefile M tests/integration/docker-compose.yml M tests/integration/scripts/test-basedirs.sh A tests/integration/scripts/test-multilevel-chain.sh A tests/integration/scripts/test-multilevel.sh
Patch 2 — crate type caching:
M src/compiler/rust.rs
Patch 3 — opendal upgrade + Vercel Artifacts backend:
M Cargo.lock M Cargo.toml M docs/Configuration.md M src/cache/cache.rs M src/cache/mod.rs A src/cache/vercel_artifacts.rs M src/config.rs M tests/harness/mod.rs
Patch 4 — README + CI/release workflows:
A .github/README.md D .github/workflows/benchmarks.yml M .github/workflows/ci.yml M .github/workflows/integration-tests.yml A .github/workflows/vercel-ci.yml A .github/workflows/vercel-release.yml
vercel-ci.yml— Runscargo teston Ubuntu on every push/PR.vercel-release.yml— Manual trigger (workflow_dispatch). Builds static musl binaries forx86_64andaarch64Linux, then creates a GitHub release taggedvercel-YYYYMMDDwith the patch stack in the release description.
When rebasing this fork on the latest upstream main, follow these steps:
-
Set up the upstream remote (one-time):
git remote add upstream https://github.com/mozilla/sccache.git -
Fetch upstream and rebase:
git fetch upstream git rebase upstream/mainThis replays each patch commit on top of the latest upstream.
-
Resolve conflicts patch-by-patch. For each patch that conflicts:
- Fix the conflict in the affected files
git add <files>andgit rebase --continue- Build and run tests to confirm correctness:
cargo build && cargo test - If a patch corresponds to an upstream PR that has been merged (e.g., #2581), it will likely produce an empty commit or trivial conflict — drop it with
git rebase --skipor remove it during interactive rebase
-
Update this README: revise the patch list above to reflect any dropped or added patches. Regenerate with
git log --oneline upstream/main..HEAD. -
Run formatting, lints, build, and tests after all patches are applied:
cargo fmt --all cargo clippy --locked --all-targets -- -D warnings -A unknown-lints -A clippy::type_complexity -A clippy::new-without-default cargo build cargo test -
Force-push the rebased branch:
git push --force-with-lease origin main