aboutsummaryrefslogtreecommitdiffstats
path: root/build.rs
blob: d2a0b5dd1ed41edef1f52679bddc4d57ae38e7a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate cbindgen;

use cbindgen::Language;

fn main() {
    let crate_dir = env!("CARGO_MANIFEST_DIR");

    let config = cbindgen::Config::from_file("cbindgen.toml")
        .expect("Failed to read 'cbindgen.toml'");

    cbindgen::Builder::new()
        .with_crate(crate_dir)
        // .with_language(Language::C)
        .with_config(config)
        .generate()
        .expect("Unable to generate bindings")
        .write_to_file("dome_key_map.h");
}