Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
f187d7f67This file is pinned to the selected release. Download the original to open it in your design tool.
#[cfg(feature = "ffi")]
extern crate cbindgen;
#[cfg(feature = "ffi")]
use std::env;
fn main() {
#[cfg(feature = "ffi")]
{
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
if let Ok(r) = cbindgen::generate(crate_dir) {
r.write_to_file("ffi.h");
} else {
// Do not fail the build on invalid source files as this is annoying
// during development because it would suppress the compiler errors.
println!("cargo::warning=Failed to generate ffi.h with cbindgen.");
}
}
}