16 lines
454 B
Rust
16 lines
454 B
Rust
use std::{env, path::Path};
|
|
|
|
fn main() {
|
|
let out_dir = env::var_os("OUT_DIR").unwrap();
|
|
|
|
let dest_bindings = Path::new(&out_dir).join("bindings.rs");
|
|
|
|
bindgen::Builder::default()
|
|
.header("../unix-loader/src/abi.h")
|
|
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
|
|
.generate()
|
|
.expect("unable to generate bindings")
|
|
.write_to_file(dest_bindings)
|
|
.expect("could not write bidnings");
|
|
}
|