1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
//! A module which detects what features romulus was compiled with.
//!
//! Used for runtime introspection rather then
//! conditional compilation.

macro_rules! feature {
    ($feat: expr) => {
        (cfg!(feature = $feat), $feat.to_string())
    };
}

/// Gives a record of which features romulus was installed with
pub fn features() -> Vec<(bool, String)> {
    vec![
        feature!("color"),
        feature!("envvar"),
        feature!("stdin-tty"),
        feature!("bind"),
    ]
}