From a6737908e0591c523975d926756ff216b39068e0 Mon Sep 17 00:00:00 2001 From: Willem Vanhulle Date: Wed, 21 Oct 2026 12:08:13 +0200 Subject: [PATCH] build: shrink the release binary from 2.82 MB to 1.74 MB Fat LTO, one codegen unit, opt-level z, and clap without color or suggestions. --- Cargo.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dcc0f38..93903a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ missing_errors_doc = "allow" workspace = true [dependencies] -clap = { version = "4.6.7", features = ["derive"] } +clap = { version = "4.6.7", default-features = false, features = ["std", "derive", "help", "usage", "error-context"] } crossterm = "0.29.0" dbus = "0.9.12" heck = "0.5.0" @@ -43,5 +43,7 @@ unicode-width = "0.2.2" zeroize = "1.9.1" [profile.release] -lto = "thin" +lto = "fat" +codegen-units = 1 +opt-level = "z" strip = true