23 lines
695 B
Rust
23 lines
695 B
Rust
use std::{
|
|
env,
|
|
path::PathBuf,
|
|
};
|
|
|
|
fn main() {
|
|
system_deps::Config::new().probe().unwrap();
|
|
|
|
let bindings = bindgen::Builder::default()
|
|
.header("wrapper.h")
|
|
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
|
|
.formatter(bindgen::Formatter::Prettyplease)
|
|
.allowlist_item("zathura_.*")
|
|
.allowlist_item("girara_list_.*")
|
|
.blocklist_item("zathura_plugin_error_e")
|
|
.blocklist_item("^cairo_.*")
|
|
.generate()
|
|
.expect("Unable to generate bindings");
|
|
|
|
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
|
|
bindings.write_to_file(out_path.join("bindings.rs")).expect("Couldn't write bindings");
|
|
}
|