INNER CODE UNIT · Rust
generate_protosept_to_file
dontpanic92/OpenPAL3 · crosscom/ccidl-rs/src/lib.rs:96
pub fn generate_protosept_to_file(
idl_path: impl AsRef<Path>,
output_path: impl AsRef<Path>,
) -> Result<Vec<PathBuf>, Error> {
let generated = generate_protosept(idl_path)?;
std::fs::write(output_path.as_ref(), generated.source).map_err(|source| Error::Io {
path: output_path.as_ref().to_path_buf(),
source,
})?;
Ok(generated.dependencies)
}
/// Generate the Rust *script bridge* for the given IDL.
///
/// For each interface marked `[protosept(scriptable)]`, the bridge emits
/// `register_<i>_proto()` and `wrap_<i>()` helpers that delegate to
/// `crosscom-protosept`.
///