I want to have a custom Cargo profile that enables Tracy profiling. Is there syntax for [dependencies] that allows this.
I want to be able to build with
cargo --profiles tracy
and have
[dependencies]
profiling = { version = "1", default-features = false }
tracy-client = {version = "0.12" }
change to
[dependencies]
profiling = { version = "1", default-features = false, features = ["profile-with-tracy"] }
tracy-client = {version = "0.12", optional = true }
in both the top-level workspace and lower-level workspaces.
The Cargo book shows [dev-dependencies], which is the right idea but apparently not usable for custom profiles. There's [build-dependencies], but that doesn't seem suitable either. [features] can almost do this, but not quite, I think.
This must be possible somehow. Building with and without profiling is a common need.