garnet/rust/build.rs
George Thomas 6028db040d Simplify build script
Seeing as we now no longer need to modify generated header files.
2026-03-30 13:07:16 +01:00

20 lines
553 B
Rust

use std::env;
use std::path::PathBuf;
fn main() {
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
let profile = env::var("PROFILE").unwrap();
cbindgen::Builder::new()
.with_crate(&crate_dir)
.with_language(cbindgen::Language::C)
.with_style(cbindgen::Style::Tag)
.generate()
.expect("Unable to generate bindings")
.write_to_file(
PathBuf::from(&crate_dir)
.join("target")
.join(&profile)
.join("garnet_rs.h"),
);
}