Running cargo-wizard to speed up compilation times.

This commit is contained in:
Dessalines 2024-12-22 13:31:27 -05:00
parent 7585aac446
commit 859356db3f
2 changed files with 8 additions and 2 deletions

2
.cargo/config.toml Normal file
View file

@ -0,0 +1,2 @@
[build]
rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zthreads=16", "-Ctarget-cpu=native"]

View file

@ -24,17 +24,21 @@ doctest = false
[lints] [lints]
workspace = true workspace = true
cargo-features = ["codegen-backend"]
# See https://github.com/johnthagen/min-sized-rust for additional optimizations # See https://github.com/johnthagen/min-sized-rust for additional optimizations
[profile.release] [profile.release]
debug = 0 debug = false
lto = "fat" lto = true
opt-level = 3 # Optimize for speed, not size. opt-level = 3 # Optimize for speed, not size.
codegen-units = 1 # Reduce parallel code generation. codegen-units = 1 # Reduce parallel code generation.
panic = "abort"
# This profile significantly speeds up build time. If debug info is needed you can comment the line # This profile significantly speeds up build time. If debug info is needed you can comment the line
# out temporarily, but make sure to leave this in the main branch. # out temporarily, but make sure to leave this in the main branch.
[profile.dev] [profile.dev]
debug = 0 debug = 0
codegen-backend = "cranelift"
[features] [features]
json-log = ["tracing-subscriber/json"] json-log = ["tracing-subscriber/json"]