mirror of
https://github.com/cccb/servicepoint.git
synced 2025-01-19 02:20:12 +01:00
16 lines
373 B
Rust
16 lines
373 B
Rust
|
extern crate cbindgen;
|
||
|
|
||
|
use std::env;
|
||
|
use cbindgen::Language;
|
||
|
|
||
|
fn main() {
|
||
|
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||
|
|
||
|
cbindgen::Builder::new()
|
||
|
.with_crate(crate_dir)
|
||
|
.with_item_prefix("sp2_")
|
||
|
.with_language(Language::C)
|
||
|
.generate()
|
||
|
.expect("Unable to generate bindings")
|
||
|
.write_to_file("bindings.h");
|
||
|
}
|