I do not know if cargo build
already does this by default, but is it possible to:
build all dependencies in 'release' (optimized) mode
but build the current crate in 'debug' mode?
I do not know if cargo build
already does this by default, but is it possible to:
build all dependencies in 'release' (optimized) mode
but build the current crate in 'debug' mode?
Yo, recently this has been made possible on nightly!
TL;DR from cargo documentation:
# Cargo.toml
cargo-features = ["profile-overrides"]
# All dependencies (but not this crate itself or any workspace member)
# will be compiled with -Copt-level=2 . This includes build dependencies.
[profile.dev.overrides."*"]
opt-level = 2
profile.dev.overrides + opt-level is precisely what I was looking for.
Thanks!