loro/crates/loro-ffi/build.rs

9 lines
327 B
Rust
Raw Normal View History

2023-01-28 11:59:37 +00:00
fn main() {
2023-01-28 11:59:37 +00:00
let crate_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
let config = cbindgen::Config::from_file("cbindgen.toml")
.expect("Unable to find cbindgen.toml configuration file");
2023-07-05 06:43:58 +00:00
cbindgen::generate_with_config(crate_dir, config)
2023-01-28 11:59:37 +00:00
.unwrap()
2023-01-28 11:59:37 +00:00
.write_to_file("target/loro_ffi.h");
2023-01-28 11:59:37 +00:00
}