Skip to content

Commit 4840162

Browse files
committed
update prost to 0.12
update bindgen to 0.69 to keep compatible with latest llvm update rand to 0.8 update clap to 4 Signed-off-by: Jay Lee <[email protected]>
1 parent 2b90b44 commit 4840162

File tree

20 files changed

+475
-1557
lines changed

20 files changed

+475
-1557
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ futures-executor = "0.3"
2323
futures-util = { version = "0.3", default-features = false, features = ["std", "sink"] }
2424
protobuf = { version = "2.0", optional = true }
2525
protobufv3 = { package = "protobuf", version = "3.2", optional = true }
26-
prost = { version = "0.11", optional = true }
26+
prost = { version = "0.12", optional = true }
2727
bytes = { version = "1.0", optional = true }
2828
log = "0.4"
2929
parking_lot = "0.12"

benchmark/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ futures-executor = "0.3"
1818
futures-util = { version = "0.3", default-features = false, features = ["std", "sink"] }
1919
libc = "0.2"
2020
grpcio-sys = { path = "../grpc-sys" }
21-
rand = "0.7"
22-
rand_distr = "0.2"
23-
rand_xorshift = "0.2"
21+
rand = "0.8"
22+
rand_distr = "0.4"
23+
rand_xorshift = "0.3"
2424
futures-timer = "3.0"
25-
clap = "2.23"
25+
clap = "4.5"
2626
log = "0.4"
2727
slog = "2.0"
2828
slog-async = "2.1"

benchmark/src/main.rs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,27 @@ use std::env;
99
use std::sync::Arc;
1010

1111
use benchmark::{init_log, Worker};
12-
use clap::{App, Arg};
12+
use clap::Parser;
1313
use futures_channel::oneshot;
1414
use grpc::{Environment, ServerBuilder, ServerCredentials};
1515
use grpc_proto::testing::services_grpc::create_worker_service;
1616
use rand::Rng;
1717

1818
const LOG_FILE: &str = "GRPCIO_BENCHMARK_LOG_FILE";
1919

20+
/// Benchmark QpsWorker
21+
///
22+
/// ref http://www.grpc.io/docs/guides/benchmarking.html.
23+
#[derive(Parser)]
24+
struct WorkerCli {
25+
/// The port the worker should listen on. For example, 8080
26+
#[arg(long)]
27+
deriver_port: Option<u16>,
28+
}
29+
2030
fn main() {
21-
let matches = App::new("Benchmark QpsWorker")
22-
.about("ref http://www.grpc.io/docs/guides/benchmarking.html")
23-
.arg(
24-
Arg::with_name("port")
25-
.long("driver_port")
26-
.help("The port the worker should listen on. For example, \"8080\"")
27-
.takes_value(true),
28-
)
29-
.get_matches();
30-
let port: u16 = matches.value_of("port").unwrap_or("8080").parse().unwrap();
31+
let cli = WorkerCli::parse();
32+
let port = cli.deriver_port.unwrap_or(8080);
3133

3234
let _log_guard = init_log(
3335
env::var(LOG_FILE)

compiler/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ prost-codec = ["prost-build", "prost-types", "prost", "derive-new", "tempfile"]
1818

1919
[dependencies]
2020
protobuf = { version = "2", optional = true }
21-
prost = { version = "0.11", optional = true }
22-
prost-build = { version = "0.11", optional = true }
23-
prost-types = { version = "0.11", optional = true }
24-
derive-new = { version = "0.5", optional = true }
21+
prost = { version = "0.12", optional = true }
22+
prost-build = { version = "0.12", optional = true }
23+
prost-types = { version = "0.12", optional = true }
24+
derive-new = { version = "0.6", optional = true }
2525
tempfile = { version = "3.0", optional = true }
2626

2727
[[bin]]

grpc-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ _gen-bindings = ["bindgen"]
6868
_list-package = []
6969

7070
[target.'cfg(not(all(any(target_os = "linux", target_os = "macos"), any(target_arch = "x86_64", target_arch = "aarch64"))))'.build-dependencies]
71-
bindgen = "0.59.0"
71+
bindgen = { version = "0.69.0", default-features = false, features = ["runtime"] }
7272

7373
[build-dependencies]
7474
cc = "1.0"
7575
cmake = "0.1"
7676
pkg-config = "0.3"
7777
walkdir = "2.2.9"
7878
# Because of rust-lang/cargo#5237, bindgen should not be upgraded util a minor or major release.
79-
bindgen = { version = "0.59.0", default-features = false, optional = true, features = ["runtime"] }
79+
bindgen = { version = "0.69.0", default-features = false, optional = true, features = ["runtime"] }
8080
boringssl-src = { version = "0.6.0", optional = true }

grpc-sys/bindings/bindings.rs

Lines changed: 377 additions & 1434 deletions
Large diffs are not rendered by default.

grpc-sys/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,6 @@ fn bindgen_grpc(file_path: &Path) {
444444
.clang_arg("-xc++")
445445
.clang_arg("-I./grpc/include")
446446
.clang_arg("-std=c++11")
447-
.rustfmt_bindings(true)
448447
.impl_debug(true)
449448
.size_t_is_usize(true)
450449
.disable_header_comment()

health/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ prost-codec = ["grpcio/prost-codec", "prost"]
2222
futures-executor = "0.3"
2323
futures-util = { version = "0.3", default-features = false, features = ["std"] }
2424
grpcio = { path = "..", version = "0.13.0", default-features = false }
25-
prost = { version = "0.11", optional = true }
25+
prost = { version = "0.12", optional = true }
2626
protobuf = { version = "2", optional = true }
2727
protobufv3 = { package = "protobuf", version = "3.2", optional = true }
2828
log = "0.4"

health/src/proto/prost/grpc.health.v1.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// This file is @generated by prost-build.
12
#[allow(clippy::derive_partial_eq_without_eq)]
23
#[derive(Clone, PartialEq, ::prost::Message)]
34
pub struct HealthCheckRequest {

interop/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protobufv3 = { package = "protobuf", version = "3.2", optional = true }
1818
futures-executor = "0.3"
1919
futures-util = { version = "0.3", default-features = false, features = ["std"] }
2020
log = "0.4"
21-
clap = "2.23"
21+
clap = { version = "4.5", features = ["derive"] }
2222
futures-timer = "3.0"
2323

2424
[[bin]]

0 commit comments

Comments
 (0)