A lot of pointless stuff
This commit is contained in:
18
lib/build.rs
18
lib/build.rs
@@ -1,17 +1,29 @@
|
||||
use std::{env, io::Result, path::PathBuf};
|
||||
use std::{env, fs, io::Result, path::PathBuf};
|
||||
|
||||
fn main() -> Result<()> {
|
||||
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||
|
||||
//let proto_dir = "proto";
|
||||
//let paths = fs::read_dir(proto_dir).unwrap();
|
||||
//for path in paths {
|
||||
// prost_build::compile_protos(&[path.unwrap().path()], &[proto_dir])?;
|
||||
// let path_str = path.unwrap().path().to_str().unwrap().to_string();
|
||||
// let descriptor = format!("{}_descriptor.bin", path_str);
|
||||
// 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));
|
||||
//}
|
||||
//
|
||||
|
||||
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));
|
||||
|
||||
tonic_prost_build::configure()
|
||||
.file_descriptor_set_path(out_dir.join("track_descriptor.bin"))
|
||||
.compile_protos(&["proto/track.proto"], &["proto"])
|
||||
.unwrap_or_else(|e| panic!("Failed to compile protos {:?}", e));
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user