mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
26 lines
732 B
Rust
26 lines
732 B
Rust
use cbindgen::*;
|
|
|
|
use std::env;
|
|
|
|
fn main() {
|
|
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
|
|
|
Builder::new()
|
|
.with_crate(crate_dir)
|
|
.with_config(Config {
|
|
language: Language::C,
|
|
cpp_compat: true,
|
|
sys_includes: vec!["stdbool.h".into(), "stdint.h".into()],
|
|
usize_is_size_t: true,
|
|
no_includes: true,
|
|
enumeration: EnumConfig {
|
|
// this appears to still default to true for C
|
|
enum_class: false,
|
|
..Default::default()
|
|
},
|
|
..Default::default()
|
|
})
|
|
.generate()
|
|
.expect("Unable to generate bindings")
|
|
.write_to_file("taskchampion.h");
|
|
}
|