// build.rs fn main() -> Result<(), Box> { tonic_build::configure() .build_server(true) .file_descriptor_set_path("src/proto/descriptor.bin") // Generate the file descriptor set .compile_protos(&["proto/api.proto"], &["proto"])?; // Use compile_protos() instead of compile() Ok(()) }