rustdesk/libs/hbb_common/build.rs

15 lines
447 B
Rust
Raw Normal View History

2021-03-29 15:59:14 +08:00
fn main() {
2023-01-24 01:50:25 +08: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-24 01:50:25 +08: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")
2023-01-27 11:42:08 +08:00
.customize(protobuf_codegen::Customize::default().tokio_bytes(true))
2021-03-29 15:59:14 +08:00
.run()
.expect("Codegen failed.");
}