From bb1d1d4c9a2b4fa3975bd21085e21741e70858dc Mon Sep 17 00:00:00 2001 From: ROMemories <152802150+ROMemories@users.noreply.github.com> Date: Wed, 11 Sep 2024 14:55:27 +0200 Subject: [PATCH] build(profiles): make the `dev` profile suitable for embedded It is our opinion that the `release` profile should be reserved for production builds. This makes the `dev` profile suitable for low-Flash targets we support, and will allow us to leverage `debug_assert!`s in debug builds. Documentation of Cargo profiles can be found here: https://doc.rust-lang.org/cargo/reference/profiles.html --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 83fb36c1..44530442 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -91,12 +91,12 @@ incremental = false codegen-units = 1 debug = true lto = false -opt-level = 1 +opt-level = "s" # Optimize for size even in debug builds [profile.release] incremental = false codegen-units = 1 -debug = true +debug = true # Required for defmt lto = false opt-level = "s"