yotei/uwusched-nodes/build.rs

12 lines
395 B
Rust
Raw Normal View History

2024-09-09 17:11:37 +02:00
use std::{env, path::PathBuf};
fn main() -> Result<(), Box<dyn std::error::Error>> {
2024-09-09 17:11:37 +02:00
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
tonic_build::configure()
.file_descriptor_set_path(out_dir.join("protocol_descriptor.bin"))
.compile(&["../protos/protocol.proto"], &["../protos"])?;
tonic_build::compile_protos("../protos/protocol.proto")?;
Ok(())
}