Files
dotfiles/rust/haproxy_ingest_proto/build.rs
T

12 lines
453 B
Rust

fn main() -> Result<(), Box<dyn std::error::Error>> {
let protoc = protoc_bin_vendored::protoc_bin_path()?;
unsafe {
std::env::set_var("PROTOC", protoc);
}
let mut config = prost_build::Config::new();
config.type_attribute(".haproxy.ingest.v1.LogBatch", "#[derive(Eq)]");
config.compile_protos(&["proto/haproxy_ingest.proto"], &["proto"])?;
println!("cargo:rerun-if-changed=proto/haproxy_ingest.proto");
Ok(())
}