dds-bridge-sys 0.1.0

Generated bindings to DDS, the double dummy solver for bridge
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::env;
use std::path::PathBuf;

fn main() {
    println!("cargo:rustc-link-lib=dds");
    let out_dir = PathBuf::from(env::var("OUT_DIR").expect("Cargo should have provided OUT_DIR"));

    bindgen::Builder::default()
        .header("vendor/src/dds.h")
        .allowlist_file("vendor/.*")
        .clang_arg("-xc++")
        .parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
        .generate()
        .expect("Failed to generate bindings")
        .write_to_file(out_dir.join("bindings.rs"))
        .expect("Failed to write bindings");
}