-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Huge binary size regression at nightly-2025-01-03 #139950
Copy link
Copy link
Closed
Labels
C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.O-appleOperating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS)Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.O-appleOperating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS)Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I observed a huge binary size regression in my project when updating the rust version to nightly-2025-01-03.
My project repo is https://github.com/mikialex/rendiation, and the build command is using
cargo build --bin viewer --release. The typical release build of the viewer binary is 16.6mb(in master), but for any rust version after(include) nightly-2025-01-03, the binary size regressed to 29mb, nearly doubled.I also compare the
lto=true codegen-unit=1release config, the master version yields a 14.8mb binary, but the regressed version yields a 21.4mb binary.To reproduce this issue, simply go to the project's root, modify the rust-toolchain.toml the channel "nightly-2025-01-04"(I don't known why it's 04 not 03). It's not a small project(95k loc), I will continue trying to find simpler ways to reproduce.
Version it worked on
before rustc 1.85.0-nightly (4363f9b 2025-01-02)
It most recently worked on:
Version with regression
before rustc 1.85.0-nightly (3f43b1a 2025-01-03)
rustc --version --verbose: