use std::path::Path;
use crate::error::{Error, Result};
pub fn verify_exports_in_build(dll_path: impl AsRef<Path>, expected: &[&str]) -> Result<()> {
let dll_path = dll_path.as_ref();
let report = crate::exports::verify_dll_exports(dll_path, expected)?;
if !report.complete {
return Err(Error::MissingExport(format!(
"Missing exports from {}: {}",
dll_path.display(),
report.missing.join(", ")
)));
}
Ok(())
}
pub fn rerun_if_dll_changed(dll_path: impl AsRef<Path>) {
println!("cargo:rerun-if-changed={}", dll_path.as_ref().display());
}