static LIB: &'static str = "libpdfio"; fn main() { println!("cargo:rustc-link-lib={}", LIB); let bindings = bindgen::Builder::default() // The input header we would like to generate // bindings for. .header("wrapper/wrapper.h") // Finish the builder and generate the bindings. .generate() // Unwrap the Result and panic on failure. .expect("Unable to generate bindings"); bindings .write_to_file("src/binding.rs") .expect("Couldn't write bindings!"); }