From ba71a7a27c06c4db094b1ce01d0e2f846b0f8def Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Sat, 29 Oct 2022 22:02:59 -0500 Subject: [PATCH] Add build profile 'release-smaller' --- Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 2f8117c..5c8cf43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,3 +22,11 @@ uniffi = { version = "0.21.0", features = ["builtin-bindgen"] } [build-dependencies] uniffi_build = { version = "0.21.0", features = ["builtin-bindgen"] } + +[profile.release-smaller] +inherits = "release" +opt-level = 'z' # Optimize for size. +lto = true # Enable Link Time Optimization +codegen-units = 1 # Reduce number of codegen units to increase optimizations. +panic = 'abort' # Abort on panic +strip = true # Strip symbols from binary*