From 55178e60fdb9866c0135ce2c3097424fd5659112 Mon Sep 17 00:00:00 2001 From: oopsbagel Date: Sat, 28 Jun 2025 00:40:40 -0700 Subject: [PATCH] cargo/config: strip debuginfo from release bins rustc -C strip=debuginfo leaves the symbol table intact, meaning RUST_BACKTRACE=1 on the installer still produces helpful output. This significantly reduces the binary size, eg the amd64 installer goes from 93M to 21M. Stripping the symbol table only reclaims a further ~2M. --- .cargo/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 16ae724..c63a35f 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -28,6 +28,7 @@ rustflags = ["-C", "target-feature=+crt-static"] # keep line numbers in stack traces for non-firmware binaries [profile.release] debug = "limited" +strip = "debuginfo" # optimizations to reduce the binary size of firmware binaries [profile.firmware] @@ -38,4 +39,3 @@ lto = true codegen-units = 1 panic = "abort" debug = false -