Expand description
Build-script support for invoking xidlc from build.rs.
This crate wraps the xidlc code generator in a small builder API so Cargo
build scripts can generate code or schema artifacts without shelling out to
the xidlc binary.
§Example
fn main() -> Result<(), xidl_build::IdlcError> {
println!("cargo:rerun-if-changed=idl/hello_world.idl");
xidl_build::Builder::new()
.with_lang("rust")
.compile(&["idl/hello_world.idl"])?;
Ok(())
}By default, generated files are written to Cargo’s OUT_DIR, and both
client and server artifacts are enabled.
Structs§
- Builder
- Configures and runs IDL code generation from a Cargo build script.
Enums§
- Idlc
Error - The error type returned by the underlying
xidlccompiler driver.