mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-01 20:07:39 +03:00
21 lines
579 B
Rust
21 lines
579 B
Rust
use std::{collections::HashSet, env};
|
|
|
|
fn main() {
|
|
let mut features = HashSet::<&'static str>::default();
|
|
|
|
for (key, _) in env::vars() {
|
|
let _ = match key.as_ref() {
|
|
"CARGO_FEATURE_COMPIO" => features.insert("compio"),
|
|
"CARGO_FEATURE_TOKIO" => features.insert("tokio"),
|
|
"CARGO_FEATURE_NEON" => features.insert("neon"),
|
|
_ => false,
|
|
};
|
|
}
|
|
|
|
if features.len() > 1 {
|
|
panic!(
|
|
"Only one runtime feature could be selected, current selection {:?}",
|
|
features
|
|
);
|
|
}
|
|
}
|