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 45059a9
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ authors = ["{{ authors }}"]
edition = "2021"
license = "MIT OR Apache-2.0"

[profile.release]
debug = true

[dependencies]
{{ mcu }}-hal = "{{ hal_version }}"
esp-backtrace = { version = "0.11.0", features = ["{{ mcu }}", "panic-handler", "exception-handler", "println"] }
Expand All @@ -32,3 +29,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 45059a9

Please sign in to comment.