Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The total Rust archive size has intensified recently #62486

Closed
tesuji opened this issue Jul 8, 2019 · 6 comments · Fixed by #64823
Closed

The total Rust archive size has intensified recently #62486

tesuji opened this issue Jul 8, 2019 · 6 comments · Fixed by #64823
Labels
I-heavy Issue: Problems and improvements with respect to binary size of generated code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@tesuji
Copy link
Contributor

tesuji commented Jul 8, 2019

Edit:

I forgot that with nightly, I also installed clippy, rustfmt, musl target.
The new edit will not contains those.

The total Rust archive size has intensified recently.

% rustc +nightly-2019-07-07-x86_64-unknown-linux-gnu -V
rustc 1.38.0-nightly (dfd52ba6a 2019-07-06)
% du -sch ~/.rustup/toolchains/nightly-2019-07-07-x86_64-unknown-linux-gnu
868M    /home/lzutao/.rustup/toolchains/nightly-2019-07-07-x86_64-unknown-linux-gnu
868M    total
% rustc +nightly-2019-07-08-x86_64-unknown-linux-gnu -V
rustc 1.38.0-nightly (6e310f2ab 2019-07-07)
% du -sch ~/.rustup/toolchains/nightly-2019-07-08-x86_64-unknown-linux-gnu
1.1G    /home/lzutao/.rustup/toolchains/nightly-2019-07-08-x86_64-unknown-linux-gnu
1.1G    total

Is this a regression caused by #59800 ?
cc @Zoxc (for the PR), @Centril (infra team)

@tesuji

This comment has been minimized.

@rustbot

This comment has been minimized.

@rustbot rustbot added the T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. label Jul 8, 2019
@Centril Centril added I-heavy Issue: Problems and improvements with respect to binary size of generated code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jul 8, 2019
@Zoxc
Copy link
Contributor

Zoxc commented Jul 8, 2019

Yes, this is an expected regression by #59800.

@mati865
Copy link
Contributor

mati865 commented Jul 8, 2019

See also #61978

@ghost ghost mentioned this issue Jul 8, 2019
@est31
Copy link
Member

est31 commented Jul 8, 2019

This contains justification of the change: #56987 (comment)

This contains suggestions on decreasing the size: #56987 (comment)

There are big improvements in compilation speed, but mostly only startup improvements (relative speedup increasing the smaller the crate is), which makes sense if you read the comment by @alexcrichton I've linked above: there is less work to do at load time of the binary.

@eddyb
Copy link
Member

eddyb commented Jul 11, 2019

My own suggestion: #59800 (comment) - reproduced below:

Has shipping .rmeta instead of .rlib been considered?
We would have to either include MIR for everything and codegen at the end (potentially subopyimal) or just throw away the .rlib and somehow require the final .so crate to be linked in order to use anything from the component crates.
For the latter, it could be as simple as a check like "at least one of the dependency crates must claim to contain each symbol referenced and be linkable".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-heavy Issue: Problems and improvements with respect to binary size of generated code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants