/* * Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause. */ use std::env; use cbindgen::{Config, Language}; fn main() { let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); let mut config = Config::default(); config.cpp_compat = true; cbindgen::Builder::new() .with_config(config) .with_crate(crate_dir) .with_language(Language::C) .with_include_guard("COZO_C_H") .with_autogen_warning( "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */", ) .with_header("/* Copyright 2022, The Cozo Project Authors. Licensed under MIT/Apache-2.0/BSD-3-Clause. */") .with_documentation(true) .generate() .expect("Unable to generate bindings") .write_to_file("cozo_c.h"); }