Skip to content

Commit ebe581b

Browse files
build(config): add optimized Cargo release profile configuration
- Set `target-dir` to "Target" to centralize build artifacts - Configure release profile with maximum optimizations: - LTO enabled for cross-crate optimizations - Codegen units reduced to 1 for better optimization - Panic strategy set to abort for smaller binaries - Strip symbols and disable debug info in release builds - Enforce git VCS for new crate initialization These changes align with Land's core performance objectives by: 1. Reducing final binary size through stripping and panic abort 2. Improving runtime performance via aggressive LTO and opt-level 3 3. Establishing consistent build artifact management 4. Ensuring clean project initialization practices Particularly critical for the Mountain (Rust backend) component where release build efficiency directly impacts application startup time and memory footprint versus Electron baseline.
1 parent 7e7ff60 commit ebe581b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.cargo/config.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[build]
2+
target-dir = "Target"
3+
4+
[cargo-new]
5+
vcs = "git"
6+
7+
[profile.release]
8+
opt-level = 3
9+
codegen-units = 1
10+
debug = false
11+
lto = true
12+
panic = "abort"
13+
strip = true

0 commit comments

Comments
 (0)