Skip to content

Commit

Permalink
chore: compile dependencies with optimizations in dev mode
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Oct 3, 2023
1 parent fa232fa commit e4a5255
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,44 @@ tide-http-auth = "0.5"
tide-rustls = "0.3"
toml = "0.8"
walkdir = "2"

# see: https://nnethercote.github.io/perf-book/build-configuration.html
[profile.dev]
opt-level = 0
debug = true
rpath = false
lto = false
debug-assertions = true
codegen-units = 4

# compile dependencies with optimizations in dev mode
# see: https://doc.rust-lang.org/stable/cargo/reference/profiles.html#overrides
[profile.dev.package."*"]
opt-level = 3
debug = true

[profile.release]
opt-level = 3
debug = false # true for profiling
rpath = false
lto = "fat"
debug-assertions = false
codegen-units = 1
strip = true
panic = "abort"

[profile.test]
opt-level = 1
debug = true
rpath = false
lto = false
debug-assertions = true
codegen-units = 4

[profile.bench]
opt-level = 3
debug = true # true for profiling
rpath = false
lto = true
debug-assertions = false
codegen-units = 1

0 comments on commit e4a5255

Please sign in to comment.