2025-08-20 06:24:36 +00:00
|
|
|
fn main() {
|
2025-08-22 17:44:56 +00:00
|
|
|
// Vendored protoc for reproducible builds
|
2025-08-20 06:24:36 +00:00
|
|
|
let protoc = protoc_bin_vendored::protoc_bin_path().expect("protoc");
|
2025-08-22 17:44:56 +00:00
|
|
|
std::env::set_var("PROTOC", &protoc);
|
|
|
|
|
|
|
|
|
|
println!("cargo:rerun-if-changed=proto/processes.proto");
|
2025-08-20 06:24:36 +00:00
|
|
|
|
|
|
|
|
// Compile protobuf definitions for processes
|
|
|
|
|
let mut cfg = prost_build::Config::new();
|
|
|
|
|
cfg.out_dir(std::env::var("OUT_DIR").unwrap());
|
2025-08-22 17:44:56 +00:00
|
|
|
// Use local path (ensures file is inside published crate tarball)
|
|
|
|
|
cfg.compile_protos(&["proto/processes.proto"], &["proto"]) // relative to CARGO_MANIFEST_DIR
|
2025-08-20 06:24:36 +00:00
|
|
|
.expect("compile protos");
|
|
|
|
|
}
|