diff options
| -rw-r--r-- | build.rs | 7 | ||||
| -rw-r--r-- | src/lib.rs | 6 |
2 files changed, 8 insertions, 5 deletions
@@ -5,6 +5,8 @@ use std::env; use std::path::PathBuf; fn main() { + cc::Build::new().file("src/bch/bch.c"); + println!("cargo:rustc-link-lib=bch"); let bindings = bindgen::Builder::default() @@ -16,9 +18,4 @@ fn main() { bindings .write_to_file(out_path.join("bindings.rs")) .expect("Couldn't write bindings!"); - - cc::Build::new() - .file("src/bch/bch.c") - .include("src/bch/bch.h") - .compile("bch"); } @@ -1,3 +1,9 @@ +#![allow(non_upper_case_globals)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] + +include!(concat!(env!("OUT_DIR"), "/bindings.rs")); + #[cfg(test)] mod tests { #[test] |
