[turbopack] Rust dependency caching via sccache#91873
Merged
Merged
Conversation
c3468fe to
f570a60
Compare
Contributor
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URL |
Contributor
Tests Passed |
f570a60 to
8ae4ddf
Compare
68f9b60 to
71dae76
Compare
721f888 to
5e25203
Compare
3ed5e70 to
38d23db
Compare
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
lukesandberg
reviewed
Apr 2, 2026
bgw
reviewed
Apr 4, 2026
bgw
approved these changes
Apr 9, 2026
…facts caching Replace the WebDAV proxy and custom cached linker with native Vercel Artifacts backend from the vercel/sccache fork. Uses multi-level caching (local disk L0 + remote L1) and SCCACHE_RUST_CRATE_TYPE_ALLOW_HASH to cache all crate types including proc-macros and cdylibs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
Use sccache, backed by the Vercel artifact cache, when compiling Rust code.
Why
Each CI runner compiles ~960 external Rust crates from scratch (~5 min) on binary cache misses, even though
Cargo.lockrarely changes between commits. Some workflows don't cache and always build from scratch.Notes
Builds will use a local cache on each runner, but we've got a lot of these runners and they'll take some time to populate that local, fastest level of cache.
Windows builds are currently hitting ~68% of cached compilations for a reason that isn't totally clear. Linux builds are caching correctly, however. A follow-up pass at this work will use an incremental turborepo caching strategy to improve this, and another pass will experiment with cross-compiling Windows from Linux which will likely also help.
Linux builds that don't change Rust files at all are nearly instantaneous (as before), and Linux builds that change Rust files will complete in approximately 1/2 the time.
checkbuilds are ~1min faster (~25% faster).LTO-heavy runs like the benchmark builders are currently still slow (approx unchanged), needs further investigation (may be related to git hash embedding?).