Skip to content

Commit

Permalink
build(profiles): make the dev profile suitable for embedded
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ROMemories committed Sep 11, 2024
1 parent 712efda commit bb1d1d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit bb1d1d4

Please sign in to comment.