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 446c246 commit 0d4f3b9
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 @@ -48,3 +48,44 @@ tokio = { version = "1", features = ["full"] }
toml = "0.8.0"
tungstenite = "0.20"
url = "2.4"

# 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 0d4f3b9

Please sign in to comment.