build: use optimizations in packages for dev builds

This commit is contained in:
Aaron Blankstein
2023-03-23 13:34:34 -05:00
parent 8cb8340e63
commit 4cd8ef001f

View File

@@ -109,8 +109,16 @@ monitoring_prom = ["prometheus"]
slog_json = ["slog-json", "stacks_common/slog_json", "clarity/slog_json"]
testing = []
[profile.dev.package.regex]
opt-level = 2
# Use a bit more than default optimization for
# dev builds to speed up test execution
[profile.dev]
opt-level = 1
# Use release-level optimization for dependencies
# This slows down "first" builds on development environments,
# but won't impact subsequent builds.
[profile.dev.package."*"]
opt-level = 3
[target.'cfg(all(any(target_arch = "x86_64", target_arch = "x86", target_arch = "aarch64"), not(target_env = "msvc")))'.dependencies]
sha2 = { version = "0.10", features = ["asm"] }