Skip to content

Commit

Permalink
Minify size of release binaries:
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dosisod committed Aug 5, 2023
1 parent 41ce6be commit 4f304c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ panic = "abort"

[profile.release]
panic = "abort"
strip = true
lto = true
codegen-units = 1

0 comments on commit 4f304c8

Please sign in to comment.