From 2b13379a5f989fa9e7fe8e2dd958e9c647afdbef 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 83fb36c13..f2ed66269 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"