From 046196a5d58522ec760313d90996320d53026865 Mon Sep 17 00:00:00 2001 From: Karim Jerbi Date: Wed, 30 Sep 2026 15:16:10 +0100 Subject: [PATCH] perf(cargo): tune dev and test profiles for faster linking and smaller binaries Sets debug = 1 on dev and test profiles to emit line tables only, reducing debug executable sizes by ~50% (~700 MB per binary) and substantially cutting linker memory overhead and disk I/O. Sets opt-level = 2 on external dependencies in dev mode ([profile.dev.package.*]) so cached third-party libraries run optimized without affecting developer code compilation speeds, improving test execution speed by ~4.6x. Release mode ([profile.release]) remains completely untouched with full -O3 optimizations. --- Cargo.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index d964beff8..5d787a74d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -153,6 +153,15 @@ web-sys = { version = "=0.3.85", features = [ ] } iced = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39", features = ["webgl", "fira-sans"] } +[profile.dev] +debug = 1 + +[profile.dev.package."*"] +opt-level = 2 + +[profile.test] +debug = 1 + [profile.release] strip = true