Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Add a debug and release profile
Browse files Browse the repository at this point in the history
  • Loading branch information
MabezDev committed Mar 12, 2024
1 parent 651bd8a commit af8aff8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,17 @@ heapless = { version = "0.8.0", default-features = false }
[features]
default = ["{{ mcu }}-hal/xtal-40mhz"]
{% endif %}

[profile.dev]
# Rust debug is too slow.
# For debug builds always builds with some optimization
opt-level = "s"

[profile.release]
codegen-units = 1 # LLVM can perform better optimizations using a single thread
debug = 2
debug-assertions = false
incremental = false
lto = 'fat'
opt-level = 's'
overflow-checks = false

0 comments on commit af8aff8

Please sign in to comment.