diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2024-06-27 08:40:23 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2024-08-29 15:44:08 +0200 |
| commit | 9900510c7b2ee8ed49db3318ccd8471785fa3b2a (patch) | |
| tree | 00b907dc4416e1f0d03799462fba1779ca652042 | |
| parent | 2ec7612acd6faa6394b4d7da52740408cf01fbcb (diff) | |
| download | mullvadvpn-9900510c7b2ee8ed49db3318ccd8471785fa3b2a.tar.xz mullvadvpn-9900510c7b2ee8ed49db3318ccd8471785fa3b2a.zip | |
Change Rust opt-level from 3 to "s" to optimize for binary size
My experiments show that on Linux this change yield ~25-30% smaller
binaries and ~20-30% faster compiles.
| -rw-r--r-- | Cargo.toml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml index 9ff2ac2784..8c7073901d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -93,11 +93,12 @@ ipnetwork = "0.20" proptest = "1.4" [profile.release] -opt-level = 3 +opt-level = "s" lto = true strip = true -# Key generation may take over one minute without optimizations -# enabled. +# Key generation may take over one minute without optimizations enabled. [profile.dev.package."classic-mceliece-rust"] opt-level = 3 +[profile.release.package."classic-mceliece-rust"] +opt-level = 3 |
