protbuf 3.1 with_bytes

This commit is contained in:
rustdesk committed 2022-07-22 00:28:10 +08:00
1 parent 2d385d88d3
commit 51d8cd80c1
9 files changed
+115 -119

No files matched your search

+6 -1
View File
@@ -1,9 +1,14 @@
fn main() {
std::fs::create_dir_all("src/protos").unwrap();
protobuf_codegen_pure::Codegen::new()
protobuf_codegen::Codegen::new()
.pure()
.out_dir("src/protos")
.inputs(&["protos/rendezvous.proto", "protos/message.proto"])
.include("protos")
.customize(
protobuf_codegen::Customize::default()
.tokio_bytes(true)
)
.run()
.expect("Codegen failed.");
}