//! Build-time codegen for the AZ-675 telemetry gRPC contract. //! //! We use `protoc-bin-vendored` so the build is self-contained — no //! system protoc install is required on dev or CI. The PROTOC env //! var is set before invoking `tonic-prost-build`, which is what //! tonic uses to locate the compiler. fn main() -> Result<(), Box> { let protoc = protoc_bin_vendored::protoc_bin_path()?; std::env::set_var("PROTOC", protoc); tonic_prost_build::configure() .build_client(true) .build_server(true) .compile_protos(&["proto/telemetry.proto"], &["proto"])?; println!("cargo:rerun-if-changed=proto/telemetry.proto"); Ok(()) }