Repository navigation
release: strip symbols in the release profile (#193) - #228
Merged
Merged
Conversation
caomengxuan666
added a commit
that referenced
this pull request
Oct 10, 2026
- Delete docs/eco-harvest-resume-wt97b.md: point-in-time lane resume/handoff snapshot; the harvest/test line now runs on GitHub Actions (eco-harvest-ci.yml) and the diagnosis lives in git history. - CHANGELOG: add Unreleased entries for strip (#228), setup help/non-tty banner (#229), bundled niugit/ripgrep/fd + setup detection (#230/#231), PROMPT_COMMAND exit jump (#232), PS0 stderr (#233), bracketed paste (#234). Co-authored-by: docs-audit <[email protected]>
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.
Fixes #193.
Change
Add
strip = "symbols"to[profile.release]inCargo.toml. Cargo strips the symbol table at link time on every target the release pipeline builds (x86_64/aarch64-pc-windows-msvc, x86_64/aarch64-unknown-linux-gnu, aarch64/x86_64-apple-darwin), so no per-platformstripstep is needed inrelease.yml. Supported since Rust 1.59; the repo already requires 1.70.Why size correlates with static linking (issue item 2)
RUSTFLAGS="-C target-feature=+crt-static"(release.yml): the CRT is statically linked and Rust std + all crates are embedded into one self-contained.exe— that is why the Windows binary is the largest artifact. Debug info goes to a side-by-side.pdbthat is not shipped, so the shipped.exeis already symbol-light;stripis a near-no-op there (verified locally, below).not strippedwith a full symbol table (~12 MB; ~11 MB afterstrip, matching the issue's measurements)..tar.gz/.zipcompress the embedded-std binary well (v1.3.3 linux-x86_64 tarball: 4.83 MB compressed from a ~12 MB binary). Stripping removes ~1 MB pre-compression, which also shrinks the compressed asset and any future self-update download.x86_64-unknown-linux-muslstatic asset remains a possible follow-up.Size table
not stripped(issue #193); localstrip→ ~11 MBPublished compressed assets for reference (v1.3.3): linux-x86_64 .tar.gz 5,068,989 B, linux-aarch64 4,790,714 B, macos-aarch64 4,277,909 B, macos-x86_64 4,670,904 B, win-x64 .zip 7,589,339 B (bundles winuxcmd), win-x64 setup 7,068,339 B.
ci.yml size gate
ci.yml has no artifact-size check/threshold job today, so there is nothing to update there; if one is added later, the Windows MSVC numbers above must not be used as a strip-effect baseline (MSVC is a no-op).
Verification
cargo build --locked --releaseon x86_64-pc-windows-msvc, both withstrip = "symbols"andstrip = "none": 10,470,912 B vs 10,469,888 B (alignment noise only, confirming the .pdb analysis).