Reduce Cargo build artifact size - #228
Merged
Merged
Conversation
Repository rules reviewRepository rules review (2570a4e391d4df75359ae043b620e7d79a3e64b0...fd96e76de4e47c76d0d769c010a9188d75f2b3c4) Verdict: pass LLM review: 1 chunk(s) (5496 chars) in 8.8s; 0 finding(s) returned, 0 kept, 0 dropped by diff-anchor filtering. No findings. |
terasakisatoshi
marked this pull request as ready for review
August 9, 2026 10:25
terasakisatoshi
enabled auto-merge (squash)
August 9, 2026 10:25
This was referenced Aug 10, 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.
Summary
devandtestprofiles while retaining Cargo's default debug assertions and overflow checksciprofile and use it for hosted tests and facade doctestsMotivation and impact
The workspace produces many test executables containing generic numerical kernels, so duplicated debuginfo accounts for a large share of
targetusage.On a fresh Apple Silicon target directory,
debug = 0reduced test artifacts from 1,717,360 KiB to 824,372 KiB (52.0%) and development artifacts from 1,082,416 KiB to 497,244 KiB (54.1%). The CI profile reduced test artifacts further to 703,520 KiB, approximately 59.0% below Cargo's default test profile.Coverage retains its instrumentation-owned profile. An integration-test consolidation experiment was rejected because its additional 3.5% reduction did not justify weakened process isolation and less convenient focused test commands.
Validation
cargo fmt --all -- --checkcargo test --workspacedocs/2026-08-09-cargo-artifact-reduction.md