9 lines
381 B
Rust
9 lines
381 B
Rust
//! Compiles `proto/meow.proto` with protox (pure Rust): no `protoc` required.
|
|||
|
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||
|
|
let proto_dir = "../../proto";
|
||
|
|
let file = format!("{proto_dir}/meow.proto");
|
||
|
|
println!("cargo:rerun-if-changed={file}");
|
||
|
|
let fds = protox::compile([file], [proto_dir])?;
|
||
|
|
prost_build::Config::new().compile_fds(fds)?;
|
||
|
|
Ok(())
|
||
|
|
}
|