9 lines
339 B
Rust
9 lines
339 B
Rust
// build.rs
|
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|
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(())
|
|
}
|