mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-24 20:48:55 +00:00
20 lines
455 B
Rust
20 lines
455 B
Rust
|
extern crate cbindgen;
|
||
|
|
||
|
use std::env;
|
||
|
use std::path::PathBuf;
|
||
|
|
||
|
fn main() {
|
||
|
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||
|
|
||
|
let output_file = PathBuf::from(env::var("CARGO_TARGET_DIR").unwrap())
|
||
|
.join("crosvm_control.h")
|
||
|
.display()
|
||
|
.to_string();
|
||
|
|
||
|
cbindgen::Builder::new()
|
||
|
.with_crate(crate_dir)
|
||
|
.generate()
|
||
|
.expect("Unable to generate bindings")
|
||
|
.write_to_file(&output_file);
|
||
|
}
|