0.5.1
This commit is contained in:
35
.cargo/config.toml
Normal file
35
.cargo/config.toml
Normal file
@@ -0,0 +1,35 @@
|
||||
[build]
|
||||
# Limit parallel compilation to reduce memory usage
|
||||
jobs = 1
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
# Aggressive memory optimization for CI/CD environments
|
||||
rustflags = [
|
||||
"-C", "link-arg=-Wl,--no-keep-memory",
|
||||
"-C", "link-arg=-Wl,--reduce-memory-overheads",
|
||||
"-C", "codegen-units=1",
|
||||
"-C", "debuginfo=0",
|
||||
"-C", "opt-level=s",
|
||||
]
|
||||
|
||||
# Profile for optimized builds with lower memory usage
|
||||
[profile.release]
|
||||
# Enable thin LTO for balance between size and memory
|
||||
lto = "thin"
|
||||
# Reduce codegen units to save memory
|
||||
codegen-units = 1
|
||||
# Strip debug info in release
|
||||
strip = true
|
||||
# Optimize for size rather than speed
|
||||
opt-level = "s"
|
||||
# Reduce memory during compilation
|
||||
debug = false
|
||||
|
||||
# Development profile with memory constraints
|
||||
[profile.dev]
|
||||
# Disable debug info to save memory
|
||||
debug = false
|
||||
# Optimize for size even in dev builds
|
||||
opt-level = "s"
|
||||
# Minimal codegen units
|
||||
codegen-units = 1
|
||||
Reference in New Issue
Block a user