2022-04-14 08:15:23 +00:00
|
|
|
// Copyright 2022 The Chromium OS Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
2022-03-25 23:10:28 +00:00
|
|
|
|
|
|
|
use std::env;
|
|
|
|
use std::path::PathBuf;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
|
|
|
|
2022-04-20 22:38:41 +00:00
|
|
|
let output_file = PathBuf::from(env::var("OUT_DIR").unwrap())
|
2022-03-25 23:10:28 +00:00
|
|
|
.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);
|
|
|
|
}
|