Rust · 822 bytes Raw Blame History
1 fn main() -> Result<(), Box<dyn std::error::Error>> {
2 // Generate protobuf code for node service (existing)
3 tonic_build::configure()
4 .build_server(true)
5 .build_client(true)
6 .compile(
7 &["../zephyrfs-proto/protobuff/node.proto"],
8 &["../zephyrfs-proto/protobuff"],
9 )?;
10
11 // Generate protobuf code for coordinator service (new)
12 tonic_build::configure()
13 .build_server(false) // We only need the client
14 .build_client(true)
15 .compile(
16 &["../zephyrfs-proto/protobuff/coordinator.proto"],
17 &["../zephyrfs-proto/protobuff"],
18 )?;
19
20 println!("cargo:rerun-if-changed=../zephyrfs-proto/protobuff/coordinator.proto");
21 println!("cargo:rerun-if-changed=../zephyrfs-proto/protobuff/node.proto");
22 Ok(())
23 }