Improve tonic-build configuration (#2)
This commit is contained in:
committed by
Lucio Franco
parent
1c2905255e
commit
eb0c0c286b
@@ -1,11 +1,8 @@
|
||||
fn main() {
|
||||
let files = &["proto/grpc/testing/test.proto"];
|
||||
let dirs = &["proto/grpc/testing"];
|
||||
let proto = "proto/grpc/testing/test.proto";
|
||||
|
||||
tonic_build::compile_protos(files, dirs, "grpc.testing").unwrap();
|
||||
tonic_build::compile_protos(proto).unwrap();
|
||||
|
||||
// prevent needing to rebuild if files (or deps) haven't changed
|
||||
for file in files {
|
||||
println!("cargo:rerun-if-changed={}", file);
|
||||
}
|
||||
println!("cargo:rerun-if-changed={}", proto);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user