Initial Functional Plugin
This commit is contained in:
21
build.rs
Normal file
21
build.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
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_.*")
|
||||
.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");
|
||||
}
|
||||
Reference in New Issue
Block a user