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

Minify size of release binaries #791

Closed
wants to merge 1 commit into from

Conversation

dosisod
Copy link
Contributor

@dosisod dosisod commented Aug 5, 2023

See https://github.com/johnthagen/min-sized-rust

Here are some stats on the different flags I used and how much each step reduced the binary size:

Method Size Diff (%)
Master 27633280 (27.6MB) N/A
strip 19544600 (19.5MB) -29.3%
strip + lto 19028504 (19.0MB) -31.1%
strip + lto + codegen 18971160 (19.97MB) -31.3%

Closes #738.

See https://github.com/johnthagen/min-sized-rust

Here are some stats on the different flags I used and how much each step
reduced the binary size:

|           Method            |        Size        | Diff (%) |
|-----------------------------|--------------------|---------:|
| Master                      | 27633280 (27.6MB)  |      N/A |
| `strip`                     | 19544600 (19.5MB)  |   -29.3% |
| `strip` + `lto`             | 19028504 (19.0MB)  |   -31.1% |
| `strip` + `lto` + `codegen` | 18971160 (19.97MB) |   -31.3% |

Closes crate-ci#738.
@epage
Copy link
Collaborator

epage commented Aug 7, 2023

I'd prefer a discussion on the issue before moving to the PR phase

@epage epage closed this Aug 7, 2023
@epage epage mentioned this pull request Aug 7, 2023
@szepeviktor
Copy link
Contributor

@dosisod Oh! I love your PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please strip release binary
3 participants