Function rsconf::enable_feature

source ยท
pub fn enable_feature(name: &str)
Expand description

Enables a feature flag that compiles code annotated with #[cfg(feature = "name")].

The feature does not have to be named in Cargo.toml to be used here or in your code, but any features dynamically enabled via this script will not participate in dependency resolution.

As of rust 1.80, features enabled in build.rs but not declared in Cargo.toml might trigger build-time warnings; consider using enable_cfg() instead if you are averse to declaring this feature publicly in Cargo.toml.