Function rsconf::set_cfg_value

source ยท
pub fn set_cfg_value(name: &str, value: &str)
Expand description

Activates conditional compilation for code behind #[cfg(name = "value")] or with if cfg!(name = "value").

As with enable_cfg(), this is entirely internal to your code: name should not appear in Cargo.toml and this configuration does not participate in dependency resolution (which takes place before your build script is called).

Call declare_cfg_values() beforehand to inform the compiler of all possible values for this cfg or else rustc 1.80+ will issue a compile-time warning about unrecognized cfg values.