I have a workspace with many crates. I end up having to add the same #![feature(...)]
flags to each crate. Is there any way to write them down in just one place, possibly by having cargo pass them as CLI flags to rustc?
(note: this is pretty hard to search for because feature
is such a heavily overloaded term in the context of rust compilation).
include!
would be about the only thing I think. Cargo can't do it itself so a workspace doesn't help and I haven't seen an option for it via RUSTFLAGS.include!()
that doesn't work... which surprised me.Cargo.toml
, to disable this targets when given feature is not present.