mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
rust/hello: Optimize the build flags
Summary: - Added `codegen-units = 1` and `opt-level = 'z'` to the release profile in `Cargo.toml` - These changes optimize the build for minimal binary size Impact: - Reduces the final binary size by ~7% (244316 -> 228380 bytes) - Improves resource utilization for embedded systems - No functional changes to the application behavior Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
6669372415
commit
9b6de015bc
1 changed files with 2 additions and 2 deletions
|
|
@ -9,11 +9,11 @@ crate-type = ["staticlib"]
|
|||
[profile.dev]
|
||||
panic = "abort"
|
||||
|
||||
# Special hanlding for the panic! macro, can be removed once
|
||||
# the libstd port for NuttX is complete.
|
||||
[profile.release]
|
||||
panic = "abort"
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
opt-level = 'z'
|
||||
|
||||
[dependencies]
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue