vector-rust-library 0.1.0

Port of Vector CLass Library to Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::env;

fn feature_shortcut(feature: &str) {
    if env::var("CARGO_CFG_TARGET_FEATURE")
        .map_or(false, |cfg| cfg.split(',').any(|f| f == feature))
    {
        println!("cargo:rustc-cfg={}", feature);
    } else {
        println!("cargo:rustc-cfg=no_{}", feature)
    }
}

fn main() {
    feature_shortcut("sse");
    feature_shortcut("avx");
}