From 652fbd4b189517bfce8f8296cc5a2e6b8be8fbb2 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Tue, 30 Apr 2024 17:43:47 +0100 Subject: [PATCH] feat: reduce executable size # Slim executables ```toml [profile.release] strip = true opt-level = "z" codegen-units = 1 lto = true ``` ## References - https://doc.rust-lang.org/stable/rustc/codegen-options/ - https://doc.rust-lang.org/rustc/profile-guided-optimization.html - https://github.com/johnthagen/min-sized-rust --- Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index f944220..6f9c979 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,3 +88,8 @@ trim-margin = "0.1.0" built = { version = "0.7.2", features = [ "git2" ] } os_info = "3.8.2" +[profile.release] +strip = true +opt-level = "z" +codegen-units = 1 +lto = true \ No newline at end of file