From 29359feb0c8719102ceea65042b4693c0b4562ca Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Sat, 8 Jun 2024 03:01:02 +0100 Subject: [PATCH] feat: reduce binary size of libpact_ffi / verifier_cli [profile.release] strip = true opt-level = "z" codegen-units = 1 we do not use lto=true, as this config is applied at the root level to both the pact_ffi and verifier_cli crates. lto=true inflates the size of the static libraries dramatically. It may be prudent to apply this in the release scripts for the verifier cli to allow for further executable size reductions. Should we elect for setting these values conditionally or via a seperate profile, such that we dont affect the --release profile for other crates in the workspace? --- rust/Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 6b307a417..0ee313a51 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -12,3 +12,8 @@ resolver = "2" [patch.crates-io] onig = { git = "https://github.com/rust-onig/rust-onig", default-features = false } + +[profile.release] +strip = true +opt-level = "z" +codegen-units = 1 \ No newline at end of file