Say we have a project called
test has a codebase with a large amount of conditional compilation in it. I need to build multiple versions of test - each one with a different output name, and different
cfg options enabled.
Currently, I can almost get what I want with the following snippet for a
[[bin]] name = "run" path = "src/main.rs" [[bin]] name = "run_d" path = "src/main.rs"
However, both of the output binaries are identical. What I need is some way to specify different cfg arguments for each build - like the
--cfg my_custom_val argument to
Is this possible? And if so, how?
Disclaimer: quite new to rust, it's highly likely I overlooked something - not used to rust/cargo's build system.