mirror of
https://github.com/gorules/zen.git
synced 2026-10-04 08:02:28 +00:00
22 lines
525 B
Rust
22 lines
525 B
Rust
use std::env;
|
|
|
|
fn main() {
|
|
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
|
|
|
let config = cbindgen::Config {
|
|
language: cbindgen::Language::C,
|
|
enumeration: cbindgen::EnumConfig {
|
|
prefix_with_name: true,
|
|
..Default::default()
|
|
},
|
|
..Default::default()
|
|
};
|
|
|
|
cbindgen::Builder::new()
|
|
.with_config(config)
|
|
.with_crate(crate_dir)
|
|
.generate()
|
|
.expect("Unable to generate bindings")
|
|
.write_to_file("zen_engine.h");
|
|
}
|