Start playing with cbindgen

This commit is contained in:
Floris Bruynooghe
2022-04-07 20:56:16 +02:00
parent 918ee47c79
commit eeaf320595
10 changed files with 945 additions and 221 deletions

View File

@@ -32,4 +32,9 @@ fn main() {
.unwrap()
.write_all(pkg_config.as_bytes())
.unwrap();
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
cbindgen::generate(crate_dir)
.expect("Unable to generate header file")
.write_to_file("bindings.h");
}