diff options
author | rustdesk <[email protected]> | 2022-07-22 00:28:10 +0800 |
---|---|---|
committer | rustdesk <[email protected]> | 2022-07-22 00:28:10 +0800 |
commit | 51d8cd80c1e0b0c1cfb08b139b7e92866389cb48 (patch) | |
tree | 0990bde9bfd4def3dde5ecaa12a95f1d7e7f7bd0 /libs | |
parent | 2d385d88d3769267b9a1011cb877be072202b623 (diff) | |
download | rustdesk-server-51d8cd80c1e0b0c1cfb08b139b7e92866389cb48.tar.gz rustdesk-server-51d8cd80c1e0b0c1cfb08b139b7e92866389cb48.zip |
protbuf 3.1 with_bytes
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hbb_common/Cargo.toml | 10 | ||||
-rw-r--r-- | libs/hbb_common/build.rs | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/libs/hbb_common/Cargo.toml b/libs/hbb_common/Cargo.toml index bc31223..4b28fc1 100644 --- a/libs/hbb_common/Cargo.toml +++ b/libs/hbb_common/Cargo.toml @@ -7,11 +7,11 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -protobuf = "3.0.0-alpha.2" -tokio = { version = "1.15", features = ["full"] } -tokio-util = { version = "0.6", features = ["full"] } +protobuf = { version = "3.1", features = ["with-bytes"] } +tokio = { version = "1.20", features = ["full"] } +tokio-util = { version = "0.7", features = ["full"] } futures = "0.3" -bytes = "1.1" +bytes = "1.2" log = "0.4" env_logger = "0.9" socket2 = { version = "0.3", features = ["reuseport"] } @@ -38,7 +38,7 @@ mac_address = "1.1" quic = [] [build-dependencies] -protobuf-codegen-pure = "3.0.0-alpha.2" +protobuf-codegen = "3.1" [target.'cfg(target_os = "windows")'.dependencies] winapi = { version = "0.3", features = ["winuser"] } diff --git a/libs/hbb_common/build.rs b/libs/hbb_common/build.rs index 99dacb7..225ec34 100644 --- a/libs/hbb_common/build.rs +++ b/libs/hbb_common/build.rs @@ -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."); } |