Repository navigation
Add sccache and nsc-backed sccache support to build system. - #5182
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for sccache as an alternative to ccache in the Stellar Core build system. It also adds deeper integration with Namespace (nsc) for remote, shared caching backed by WebDAV storage, which could speed up both CI and local rebuilds.
Changes:
- Adds
--enable-sccacheand--enable-nsc-sccacheconfigure flags that set up sccache for C/C++ (viaCC/CXXwrapping) and Rust (viaRUSTC_WRAPPER), with mutual exclusion against ccache and AFL. - When
--enable-nsc-sccacheis used, configure runsnsc cache sccache setup, starts a persistent sccache daemon with the remote credentials, and verifies WebDAV connectivity. - Propagates
RUSTC_WRAPPERthroughMakefile.amto allcargoinvocations (cxxbridge install, librust builds, soroban builds).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
configure.ac |
Adds sccache/nsc-sccache configure options, daemon lifecycle management, CC/CXX/RUSTC_WRAPPER setup, AFL incompatibility check, and propagation to sub-configures. |
src/Makefile.am |
Defines RUSTC_WRAPPER from configure substitution and passes it as an environment variable to all cargo invocations. |
leighmcculloch
approved these changes
Mar 17, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds support for sccache in the build system. It allows both local use of sccache and, more interestingly, remote use of a globally-shared, network-based, namespace-provisioned (and tenant-private) cache for anyone building with a namespace account. This should provide significant speedups in both CI and local (re)building.
On my laptop (and network connection, which is granted fairly fast) this rebuilds core (including all sub-sorobans) in 1m53s, against the remote cache in chicago (I'm in vancouver).