constants and basic header generation

This commit is contained in:
dignifiedquire
2019-04-27 00:33:40 +03:00
parent 7c8db256e2
commit 9a1fcc745e
5 changed files with 628 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
extern crate bindgen;
extern crate cc;
use std::env;
fn main() {
let mut config = cc::Build::new();
config.file("misc.h");
@@ -28,4 +29,12 @@ fn main() {
} else if std::env::var("TARGET").unwrap().contains("linux") {
println!("cargo:rustc-link-lib=dylib=etpan");
}
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
cbindgen::Builder::new()
.with_crate(crate_dir)
.generate()
.expect("Unable to generate bindings")
.write_to_file("deltachat.h");
}