Add grpc reflections
Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use std::io::Result;
|
||||
use std::{env, io::Result, path::PathBuf};
|
||||
|
||||
fn main() -> Result<()> {
|
||||
//let proto_dir = "proto";
|
||||
@@ -6,7 +6,11 @@ fn main() -> Result<()> {
|
||||
//for path in paths {
|
||||
// prost_build::compile_protos(&[path.unwrap().path()], &[proto_dir])?;
|
||||
//}
|
||||
tonic_prost_build::compile_protos("proto/audio_backend.proto")
|
||||
//
|
||||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||
tonic_prost_build::configure()
|
||||
.file_descriptor_set_path(out_dir.join("audio_backend_descriptor.bin"))
|
||||
.compile_protos(&["proto/audio_backend.proto"], &["proto"])
|
||||
.unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e));
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user