enable_feature

Function 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; use declare_feature() instead to avoid this warning.