18 lines
482 B
Rust
Raw Normal View History

2021-03-29 15:59:14 +08:00
fn main() {
2023-01-23 18:50:25 +01:00
let out_dir = format!("{}/protos", std::env::var("OUT_DIR").unwrap());
std::fs::create_dir_all(&out_dir).unwrap();
protobuf_codegen::Codegen::new()
.pure()
2023-01-23 18:50:25 +01:00
.out_dir(out_dir)
2022-01-10 18:05:42 +08:00
.inputs(&["protos/rendezvous.proto", "protos/message.proto"])
2021-03-29 15:59:14 +08:00
.include("protos")
.customize(
protobuf_codegen::Customize::default()
.tokio_bytes(true)
)
2021-03-29 15:59:14 +08:00
.run()
.expect("Codegen failed.");
}