mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-05 18:20:34 +00:00
25d7911e8d
BUG=none TEST=cargo chekc Change-Id: I24fa7eced9053eee535778153390f4039044e47f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3581447 Reviewed-by: Dennis Kempin <denniskempin@google.com> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Kameron Lutes <kalutes@chromium.org>
21 lines
600 B
Rust
21 lines
600 B
Rust
// 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.
|
|
|
|
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);
|
|
}
|