rustdesk-server/libs/hbb_common/build.rs

15 lines
442 B
Rust
Raw Normal View History

2022-05-12 20:07:45 +08:00
fn main() {
2023-01-27 11:00:59 +08:00
let out_dir = format!("{}/protos", std::env::var("OUT_DIR").unwrap());
std::fs::create_dir_all(&out_dir).unwrap();
2023-02-08 16:00:12 +08:00
2022-07-22 00:28:10 +08:00
protobuf_codegen::Codegen::new()
.pure()
2023-01-27 11:00:59 +08:00
.out_dir(out_dir)
2023-02-08 16:45:30 +08:00
.inputs(["protos/rendezvous.proto", "protos/message.proto"])
2022-05-12 20:07:45 +08:00
.include("protos")
2022-08-04 17:02:10 +08:00
.customize(protobuf_codegen::Customize::default().tokio_bytes(true))
2022-05-12 20:07:45 +08:00
.run()
.expect("Codegen failed.");
}