Closed joshlf closed 2 years ago
I would prefer not to build this into this crate, but it seems reasonable for someone else to maintain in a different macro.
How would you feel about a simpler #[rustversion::env(VAR = "value")]
that could be used by downstream code to implement things like #[rustversion::env(CARGO_PKG_RUST_VERSION = "1.2.3")]
? I'd be happy to do the implementation work and put up a PR. Obviously no worries if this doesn't fit into your vision for rustversion/you don't want to maintain it/etc.
Not interested in that either.
It would be nice if there were a way to conditionally compile based on a crate's MSRV - something like
#[rustversion::msrv]
. Perhaps this could consume therust-version
key from Cargo.toml or theCARGO_PKG_RUST_VERSION
environment variable, which Cargo sets based on that Cargo.toml key.