clap
clap copied to clipboard
feat(mangen): clap/env is itself a feature of mangen
This adds env
as a feature to clap_mangen
and enables it by default to keep the default behaviour. I wish there was a way to make it automatically enable the feature if it detects the used library/binary uses clap/env
, though I'm unsure of how to exactly do that. I found this StackOverflow post, though it would be somewhat non-trivial and I would appreciate some input.
Fixes #3355.
I wish there was a way to make it automatically enable the feature if it detects the used library/binary uses clap/env
It's (kinda) possible with a build script, see cargo:rustc-cfg
It doesn't make it possible to enable a cargo feature, but you can still achieve conditional compilation with that. Not sure if adding a build script is worth though.
Build scripts bring in their own build-time performance issues so I lean towards keeping things simple until the next MSRV bump where we get the new feature features.