Open oconnor663 opened 5 months ago
TODO: figure out what environment variable should enable this
In the RVV support for the rust crypto packages that I've been working on, I've generally been following the scheme where first, the feature gate for v
is used (e.g., #[cfg(target_feature = "v")]
) and then, for the extensions which don't have corresponding Rust features yet (but are exposed to the LLVM code generator), I've been adding cfg
flags that follow the naming scheme target_feature_<ext>
.
The intention is that these cfg flags would be replaced by proper target_feature gates once the features are exposed to Rust.
If you followed that scheme here, you'd end up with something like this:
#[cfg(all(target_feature = "v", target_feature = "zbb", target_feature_zvbb))]
...
If you're trying to parse this through the environment variables, it looks like the variable CARGO_CFG_TARGET_FEATURE
is set to a comma separated list of the target features enabled. You should be able to get general cfg flags from CARGO_CFG_<cfg>
, so then target_feature_zvbb
should be set as CARGO_CFG_TARGET_FEATURE_ZVBB
. Referenced here.
TODO: figure out what environment variable should enable this