dcc-oxidizer 0.1.2

Oxidizing DCCs into Rust. Allowing a bridge between the DCC API and image processing in Rust, using FFI.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use cbindgen;
fn main() {
    println!("cargo:rerun-if-changed=NULL");
    match std::env::var("DCC_OXIDIZER_HEADER_FILE") {
        Ok(file_path) => create_bindings(&file_path),
        Err(error) => println!("{}", error),
    }
}

fn create_bindings(file_path: &str) {
    let crate_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
    cbindgen::Builder::new()
        .with_crate(crate_dir)
        .include_item("ImagePlaneBuffer")
        .generate()
        .expect("Unable to generate bindings")
        .write_to_file(file_path);
}