features!() { /* proc-macro */ }Expand description
Proc macro that returns the enabled features, joined by commas, as a string literal.
The value is sourced from the PREBINDGEN_FEATURES compile-time environment variable,
which is set by calling prebindgen::init_prebindgen_out_dir() in your crate’s build.rs.
§Panics
Emits a compile-time error if PREBINDGEN_FEATURES is not set, which typically means
prebindgen::init_prebindgen_out_dir() wasn’t called in build.rs.
§Returns
A string literal containing the comma-separated list of enabled features. The string may be empty if no features are enabled.
§Example
ⓘ
use prebindgen_proc_macro::features;
pub const ENABLED_FEATURES: &str = features!();