mirror of
https://github.com/cccb/servicepoint.git
synced 2025-01-18 18:10:14 +01:00
14 lines
395 B
Rust
14 lines
395 B
Rust
|
use std::env;
|
||
|
|
||
|
use cbindgen::{generate_with_config, Config};
|
||
|
|
||
|
fn main() {
|
||
|
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||
|
let config = Config::from_file(crate_dir.clone() + "/cbindgen.toml").unwrap();
|
||
|
let servicepoint_dir = crate_dir.clone() + "/../servicepoint";
|
||
|
|
||
|
generate_with_config(servicepoint_dir, config)
|
||
|
.unwrap()
|
||
|
.write_to_file("servicepoint.h");
|
||
|
}
|