From 6efe83b36da25d4b5a9f2185fd1457ad575d0c8f Mon Sep 17 00:00:00 2001 From: oopsbagel Date: Sat, 28 Jun 2025 14:40:12 -0700 Subject: [PATCH] cargo/config: build release bins with opt-level z This yields a smaller binary and faster compile times than the default. cf 5.6M binary in 2m 12s vs. 4.7M in 1m 39s on my machine. --- .cargo/config.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index e0ac604..39edc90 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -29,6 +29,7 @@ rustflags = ["-C", "target-feature=+crt-static"] # keep line numbers in stack traces for non-firmware binaries debug = "limited" lto = "fat" +opt-level = "z" strip = "debuginfo" # optimizations to reduce the binary size of firmware binaries