Browse Source

Reduce the executable size

In release mode, the executable size should be kept to the bare minimum
in order to be used in environments with low storage and reduce the data
consumption when pre-built packages are downloaded. Because performance
is absolutely not needed, it allows to a quite aggressive compiling
strategy (opt-level = 'z').

https://doc.rust-lang.org/cargo/reference/manifest.html#the-profile-sections
Fixes #1
pull/5/head
Rodolphe Breard 6 years ago
parent
commit
6258175c5e
  1. 6
      Cargo.toml
  2. 2
      README.md

6
Cargo.toml

@ -2,3 +2,9 @@
members = [
"acmed",
]
[profile.release]
opt-level = 'z'
lto = 'thin'
codegen-units = 1
panic = 'abort'

2
README.md

@ -32,7 +32,7 @@ In order to compile ADMEd, you will need the [Rust](https://www.rust-lang.org/)
ACMEd depends on the OpenSSL. The minimal supported versions are those from the [openssl](https://docs.rs/openssl/) crate, currently OpenSSL 1.0.1 through 1.1.1 and LibreSSL 2.5 through 2.8.
```
cargo build --release
cargo build --release && strip target/release/acmed
```
The executable is located in `target/release/acmed`.

Loading…
Cancel
Save