1
0
Fork 0
ruma/crates/ruma-common/build.rs
Kévin Commaille 62bd965db7 identifiers: Fix using RUMA_IDENTIFIERS_STORAGE environment variable
The value of the `cfg` setting must be between double quotes, so we use
the debug implementation of `String` to do just that.
2026-02-25 15:16:06 +01:00

17 lines
628 B
Rust

use std::env;
fn main() {
// Set the `ruma_identifiers_storage` configuration from an environment variable.
if let Ok(value) = env::var("RUMA_IDENTIFIERS_STORAGE") {
println!("cargo:rustc-cfg=ruma_identifiers_storage={value:?}");
}
println!("cargo:rerun-if-env-changed=RUMA_IDENTIFIERS_STORAGE");
// Set the `ruma_unstable_exhaustive_types` configuration from an environment variable.
if env::var("RUMA_UNSTABLE_EXHAUSTIVE_TYPES").is_ok() {
println!("cargo:rustc-cfg=ruma_unstable_exhaustive_types");
}
println!("cargo:rerun-if-env-changed=RUMA_UNSTABLE_EXHAUSTIVE_TYPES");
}