Repository navigation
perf(rust): stop copying rlibs on every Windows build - #427
Merged
Merged
Conversation
Every Windows Rust compile copied each transitive rlib into a per-crate search directory, rebuilt by uncached actions on every build. For the Once CLI graph that is about 6,700 copies and 11 GB that are copied, hashed, and stored again on every build, and the uncached actions keep each target from reusing its build receipt. Only proc-macro DLLs need a staging directory, because MSVC writes sibling files next to them. Rlibs are already declared inputs of each compile, so pointing rustc at their own directories, as on other hosts, is enough. Amp-Thread-ID: https://ampcode.com/threads/T-01a1bfcc-5807-76c0-92bc-c557bc3b66a7 Co-authored-by: Marek Fort <marek@tuist.dev>
The release graph build resolved its bootstrap before signing in to Tuist, so the bootstrap always fell back to a Cargo build. Select the cache first, as the release workflow does. Amp-Thread-ID: https://ampcode.com/threads/T-01a1bfcc-5807-76c0-92bc-c557bc3b66a7 Co-authored-by: Marek Fort <marek@tuist.dev>
fortmarek
marked this pull request as ready for review
November 9, 2026 17:54
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.
Summary
Windows Rust builds did far more work than the cache could save:
bypass, so no target could reuse its build receipt.onceworkflow's Windows release graph build signed in to Tuist only after resolving the bootstrap, so the bootstrap always fell back to a Cargo build. It now selects the cache first, as the release workflow does.Measurements
release graph build (windows-latest)mainat the same tree as the warm #426 runbypassmisshitThe bootstrap still reports
bypass: the latest released Once builds it with its own embedded prelude, which still stages rlib copies. The first release that includes this change removes those copies from the bootstrap too.