#[cfg(feature = "current_platform")]
use std::collections::HashMap;
#[cfg(feature = "current_platform")]
fn main() {
let mut cfg = HashMap::new();
for (k, v) in std::env::vars() {
if let Some(opt) = k.strip_prefix("CARGO_CFG_") {
cfg.insert(opt.to_lowercase().to_string(), v);
}
}
println!(
"cargo::rustc-env=CFG_OPTIONS_JSON={}",
serde_json::to_string(&cfg).expect("could not serialize cfg options")
);
}
#[cfg(not(feature = "current_platform"))]
fn main() {}