use std::path::PathBuf;
use std::process;
fn main() {
let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let mut real_bin = manifest_dir
.join("target")
.join("debug")
.join("uniffi-bindgen");
if cfg!(windows) {
real_bin.set_extension("exe");
}
let status = process::Command::new(&real_bin)
.args(std::env::args_os().skip(1))
.status()
.unwrap_or_else(|e| {
eprintln!(
"uniffi-bindgen stub: failed to exec {}: {}",
real_bin.display(),
e
);
process::exit(1);
});
process::exit(status.code().unwrap_or(1));
}