Rust appears to support `#[cfg(feature = "foo")]` to control optional features: [Cargo doc](http://doc.crates.io/manifest.html#the-features-section). The Rust reference on `cfg` does not mention `feature`: [nightly doc](https://doc.rust-lang.org/nightly/reference.html#conditional-compilation).