mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-10 00:55:25 +00:00
Running cargo-wizard to speed up compilation times.
This commit is contained in:
parent
7585aac446
commit
859356db3f
2 changed files with 8 additions and 2 deletions
2
.cargo/config.toml
Normal file
2
.cargo/config.toml
Normal file
|
@ -0,0 +1,2 @@
|
|||
[build]
|
||||
rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zthreads=16", "-Ctarget-cpu=native"]
|
|
@ -24,17 +24,21 @@ doctest = false
|
|||
[lints]
|
||||
workspace = true
|
||||
|
||||
cargo-features = ["codegen-backend"]
|
||||
|
||||
# See https://github.com/johnthagen/min-sized-rust for additional optimizations
|
||||
[profile.release]
|
||||
debug = 0
|
||||
lto = "fat"
|
||||
debug = false
|
||||
lto = true
|
||||
opt-level = 3 # Optimize for speed, not size.
|
||||
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
|
||||
# out temporarily, but make sure to leave this in the main branch.
|
||||
[profile.dev]
|
||||
debug = 0
|
||||
codegen-backend = "cranelift"
|
||||
|
||||
[features]
|
||||
json-log = ["tracing-subscriber/json"]
|
||||
|
|
Loading…
Reference in a new issue