nuttx-apps/examples/rust/hello/Cargo.toml
Huang Qi 9b6de015bc 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>
2025-01-19 17:16:38 +08:00

22 lines
337 B
TOML

[package]
name = "hello"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["staticlib"]
[profile.dev]
panic = "abort"
[profile.release]
panic = "abort"
lto = true
codegen-units = 1
opt-level = 'z'
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1", features = ["rt"] }