feat: Implement gRPC Reflection Service (#340)

Co-authored-by: Samani G. Gikandi <[email protected]>
This commit is contained in:
James Nugent
2021-02-16 11:07:51 -05:00
committed by GitHub
co-authored by Samani G. Gikandi
parent f49d4bdf99
commit c54f24721c
15 changed files with 1524 additions and 1 deletions
+9 -1
View File
@@ -1,10 +1,18 @@
use std::env;
use std::path::PathBuf;
fn main() {
tonic_build::configure()
.type_attribute("routeguide.Point", "#[derive(Hash)]")
.compile(&["proto/routeguide/route_guide.proto"], &["proto"])
.unwrap();
tonic_build::compile_protos("proto/helloworld/helloworld.proto").unwrap();
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
tonic_build::configure()
.file_descriptor_set_path(out_dir.join("helloworld_descriptor.bin"))
.compile(&["proto/helloworld/helloworld.proto"], &["proto"])
.unwrap();
tonic_build::compile_protos("proto/echo/echo.proto").unwrap();
tonic_build::configure()