From 7c8df43d210ff79a701c60dcc729ca0dd39c1e67 Mon Sep 17 00:00:00 2001 From: Joeri Sykora Date: Sat, 23 Nov 2024 09:32:52 +0100 Subject: [PATCH] fix compilation errors --- Cargo.lock | 245 +++++++++----------- rust/bridge/shared/types/src/jni/convert.rs | 39 ++-- rust/bridge/shared/types/src/jni/grpc.rs | 10 +- rust/bridge/shared/types/src/jni/quic.rs | 6 +- rust/chat/Cargo.toml | 4 +- rust/chat/build.rs | 2 +- rust/grpc/Cargo.toml | 4 +- rust/grpc/build.rs | 2 +- 8 files changed, 146 insertions(+), 166 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 85d76bfda7..e35af4f93d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -291,7 +291,7 @@ dependencies = [ "asn1", "assert_matches", "base64 0.22.1", - "bitflags 2.6.0", + "bitflags", "blake2", "boring", "chacha20poly1305", @@ -304,8 +304,8 @@ dependencies = [ "libc", "libcrux-ml-kem", "log", - "prost 0.13.3", - "prost-build 0.13.3", + "prost", + "prost-build", "rand_core", "serde", "serde_json", @@ -329,18 +329,17 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" -version = "0.6.20" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.31", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "itoa", "matchit", "memchr", @@ -349,25 +348,28 @@ dependencies = [ "pin-project-lite", "rustversion", "serde", - "sync_wrapper", - "tower", + "sync_wrapper 1.0.2", + "tower 0.5.1", "tower-layer", "tower-service", ] [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", "futures-util", - "http 0.2.12", - "http-body 0.4.6", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 1.0.2", "tower-layer", "tower-service", ] @@ -420,7 +422,7 @@ version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cexpr", "clang-sys", "itertools 0.13.0", @@ -447,12 +449,6 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.6.0" @@ -497,7 +493,7 @@ name = "boring" version = "4.9.0" source = "git+https://github.com/signalapp/boring?tag=signal-v4.9.0b#3d4180b232d332a86ee3b41d1a622b0f1c1c6037" dependencies = [ - "bitflags 2.6.0", + "bitflags", "boring-sys", "foreign-types", "libc", @@ -1827,6 +1823,9 @@ dependencies = [ "h2 0.4.7", "http 1.1.0", "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", "pin-project-lite", "smallvec", "tokio", @@ -1835,14 +1834,15 @@ dependencies = [ [[package]] name = "hyper-timeout" -version = "0.4.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 0.14.31", + "hyper 1.5.1", + "hyper-util", "pin-project-lite", "tokio", - "tokio-io-timeout", + "tower-service", ] [[package]] @@ -1852,12 +1852,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" dependencies = [ "bytes", + "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", "hyper 1.5.1", "pin-project-lite", + "socket2", "tokio", + "tower-service", + "tracing", ] [[package]] @@ -2109,15 +2113,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -2316,7 +2311,7 @@ dependencies = [ "neon", "nonzero_ext", "paste", - "prost 0.13.3", + "prost", "rand", "scopeguard", "sha2", @@ -2368,7 +2363,7 @@ dependencies = [ "neon", "nonzero_ext", "paste", - "prost 0.13.3", + "prost", "scopeguard", "strum", "tokio", @@ -2492,8 +2487,8 @@ dependencies = [ "hex-literal", "hmac", "proptest", - "prost 0.13.3", - "prost-build 0.13.3", + "prost", + "prost-build", "sha2", "test-case", "uuid", @@ -2601,8 +2596,8 @@ dependencies = [ "pin-project", "proptest", "proptest-state-machine", - "prost 0.13.3", - "prost-build 0.13.3", + "prost", + "prost-build", "rand", "rand_core", "rustls 0.23.18", @@ -2658,7 +2653,7 @@ dependencies = [ "pin-project", "pretty_assertions", "proptest", - "prost 0.13.3", + "prost", "rangemap", "rcgen", "rustls 0.23.18", @@ -2727,8 +2722,8 @@ dependencies = [ "pqcrypto-kyber 0.8.1", "pqcrypto-traits", "proptest", - "prost 0.13.3", - "prost-build 0.13.3", + "prost", + "prost-build", "rand", "rayon", "serde", @@ -2754,8 +2749,8 @@ dependencies = [ "hkdf", "nonzero_ext", "proptest", - "prost 0.13.3", - "prost-build 0.13.3", + "prost", + "prost-build", "rand_core", "sha2", "signal-crypto", @@ -2922,7 +2917,7 @@ version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c4d14bcca0fd3ed165a03000480aaa364c6860c34e900cb2dafdf3b95340e77" dependencies = [ - "bitflags 2.6.0", + "bitflags", "debugid", "num-derive", "num-traits 0.2.19", @@ -3659,7 +3654,7 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" dependencies = [ - "bitflags 2.6.0", + "bitflags", "hex", ] @@ -3671,7 +3666,7 @@ checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.6.0", + "bitflags", "lazy_static", "num-traits 0.2.19", "rand", @@ -3692,16 +3687,6 @@ dependencies = [ "proptest", ] -[[package]] -name = "prost" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" -dependencies = [ - "bytes", - "prost-derive 0.12.6", -] - [[package]] name = "prost" version = "0.13.3" @@ -3709,28 +3694,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", - "prost-derive 0.13.3", -] - -[[package]] -name = "prost-build" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4" -dependencies = [ - "bytes", - "heck", - "itertools 0.12.1", - "log", - "multimap", - "once_cell", - "petgraph", - "prettyplease", - "prost 0.12.6", - "prost-types 0.12.6", - "regex", - "syn 2.0.89", - "tempfile", + "prost-derive", ] [[package]] @@ -3747,26 +3711,13 @@ dependencies = [ "once_cell", "petgraph", "prettyplease", - "prost 0.13.3", - "prost-types 0.13.3", + "prost", + "prost-types", "regex", "syn 2.0.89", "tempfile", ] -[[package]] -name = "prost-derive" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" -dependencies = [ - "anyhow", - "itertools 0.12.1", - "proc-macro2", - "quote", - "syn 2.0.89", -] - [[package]] name = "prost-derive" version = "0.13.3" @@ -3780,22 +3731,13 @@ dependencies = [ "syn 2.0.89", ] -[[package]] -name = "prost-types" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0" -dependencies = [ - "prost 0.12.6", -] - [[package]] name = "prost-types" version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" dependencies = [ - "prost 0.13.3", + "prost", ] [[package]] @@ -4077,7 +4019,7 @@ version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -4104,6 +4046,7 @@ version = "0.23.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", @@ -4258,7 +4201,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -4392,7 +4335,7 @@ version = "0.1.0" dependencies = [ "async-trait", "displaydoc", - "prost 0.13.3", + "prost", "thiserror", "tokio", "tokio-stream", @@ -4428,7 +4371,7 @@ version = "0.1.0" dependencies = [ "async-trait", "displaydoc", - "prost 0.13.3", + "prost", "thiserror", "tokio", "tokio-stream", @@ -4681,6 +4624,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + [[package]] name = "synstructure" version = "0.13.1" @@ -4912,16 +4861,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - [[package]] name = "tokio-macros" version = "2.4.0" @@ -4944,6 +4883,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.18", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-socks" version = "0.5.2" @@ -5023,29 +4973,31 @@ dependencies = [ [[package]] name = "tonic" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.7", + "base64 0.22.1", "bytes", - "h2 0.3.26", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.31", + "h2 0.4.7", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.5.1", "hyper-timeout", + "hyper-util", "percent-encoding", "pin-project", - "prost 0.12.6", + "prost", "rustls-pemfile", - "rustls-pki-types", + "socket2", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.0", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -5054,13 +5006,14 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.11.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" dependencies = [ "prettyplease", "proc-macro2", - "prost-build 0.12.6", + "prost-build", + "prost-types", "quote", "syn 2.0.89", ] @@ -5085,6 +5038,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -5287,8 +5254,8 @@ dependencies = [ "log", "poksho", "proptest", - "prost 0.13.3", - "prost-build 0.13.3", + "prost", + "prost-build", "rand", "sha2", "signal-crypto", @@ -5396,7 +5363,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "tokio", - "tokio-rustls", + "tokio-rustls 0.25.0", "tokio-tungstenite 0.21.0", "tokio-util", "tower-service", @@ -5490,7 +5457,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66b5563fa963cea48af3e95b65b475bee688e78c04715dfe8c2eef6f812996d3" dependencies = [ "assert_matches", - "bitflags 2.6.0", + "bitflags", "bitstream-io", "bytes", "derive_builder", diff --git a/rust/bridge/shared/types/src/jni/convert.rs b/rust/bridge/shared/types/src/jni/convert.rs index 841e4175f7..6f2d40e80f 100644 --- a/rust/bridge/shared/types/src/jni/convert.rs +++ b/rust/bridge/shared/types/src/jni/convert.rs @@ -548,6 +548,19 @@ impl<'storage, 'param: 'storage, 'context: 'param> ArgTypeInfo<'storage, 'param, } } +impl<'storage, 'param: 'storage, 'context: 'param> ArgTypeInfo<'storage, 'param, 'context> + for &'storage mut dyn QuicCallbackListener +{ + type ArgType = JavaQuicCallbackListener<'param>; + type StoredType = JniQuicCallbackListener<'storage>; + + fn borrow(env: &mut JNIEnv<'context>, store: &'param Self::ArgType) -> Result { + Self::StoredType::new(env, store) + } + fn load_from(stored: &'storage mut Self::StoredType) -> Self { + stored + } +} /// A translation from a Java interface where the implementing class wraps the Rust handle. impl<'a> SimpleArgTypeInfo<'a> for CiphertextMessageRef<'a> { @@ -629,14 +642,14 @@ impl<'a> SimpleArgTypeInfo<'a> for crate::grpc::GrpcHeaders { let mut headers = HashMap::new(); - let jmap = env.get_map(foreign)?; - let mut jmap_iter = jmap.iter(env)?; + let jmap = env.get_map(foreign).check_exceptions(env, "grpc::GrpcHeaders::convert_from")?; + let mut jmap_iter = jmap.iter(env).check_exceptions(env, "grpc::GrpcHeaders::convert_from")?; while let Ok(Some((key, value))) = jmap_iter.next(env) { - let header_key: String = env.get_string(&key.into())?.into(); - let values = env.get_list(&value)?; - let mut values_iter = values.iter(env)?; + let header_key: String = env.get_string(&key.into()).check_exceptions(env, "grpc::GrpcHeaders::convert_from")?.into(); + let values = env.get_list(&value).check_exceptions(env, "grpc::GrpcHeaders::convert_from")?; + let mut values_iter = values.iter(env).check_exceptions(env, "grpc::GrpcHeaders::convert_from")?; while let Ok(Some(value)) = values_iter.next(env) { - let header_value: String = env.get_string(&value.into())?.into(); + let header_value: String = env.get_string(&value.into()).check_exceptions(env, "grpc::GrpcHeaders::convert_from")?.into(); headers .entry(header_key.clone()) .and_modify(|l: &mut Vec| l.push(header_value.clone())) @@ -652,17 +665,17 @@ impl <'a> ResultTypeInfo<'a> for signal_grpc::GrpcReply { type ResultType = JByteArray<'a>; fn convert_into(self, env: &mut JNIEnv<'a>) -> Result { - let message = env.byte_array_from_slice(&self.message)?; + let message = env.byte_array_from_slice(&self.message).check_exceptions(env, "signal_grpc::GrpcReply::convert_from")?; let args = jni_args!(( self.statuscode => int, message => [byte], ) -> void); - let class_name = env.find_class(jni_class_name!(org.signal.libsignal.grpc.SignalRpcReply))?; + let class_name = env.find_class(jni_class_name!(org.signal.libsignal.grpc.SignalRpcReply)).check_exceptions(env, "signal_grpc::GrpcReply::convert_from")?; let jobj = env.new_object( class_name, args.sig, &args.args, - )?; + ).check_exceptions(env, "signal_grpc::GrpcReply::convert_from")?; Ok(jobj.into()) } } @@ -676,11 +689,11 @@ impl<'a> SimpleArgTypeInfo<'a> for crate::quic::QuicHeaders { let mut headers = HashMap::new(); - let jmap = env.get_map(foreign)?; - let mut jmap_iter = jmap.iter(env)?; + let jmap = env.get_map(foreign).check_exceptions(env, "quic::QuicHeaders::convert_from")?; + let mut jmap_iter = jmap.iter(env).check_exceptions(env, "quic::QuicHeaders::convert_from")?; while let Ok(Some((key, value))) = jmap_iter.next(env) { - let header_key: String = env.get_string(&key.into())?.into(); - let header_value: String = env.get_string(&value.into())?.into(); + let header_key: String = env.get_string(&key.into()).check_exceptions(env, "quic::QuicHeaders::convert_from")?.into(); + let header_value: String = env.get_string(&value.into()).check_exceptions(env, "quic::QuicHeaders::convert_from")?.into(); headers.insert(header_key.clone(), header_value.clone()); } diff --git a/rust/bridge/shared/types/src/jni/grpc.rs b/rust/bridge/shared/types/src/jni/grpc.rs index fdfd93d146..34d358b5af 100644 --- a/rust/bridge/shared/types/src/jni/grpc.rs +++ b/rust/bridge/shared/types/src/jni/grpc.rs @@ -27,8 +27,8 @@ impl<'a> JniGrpcReplyListener<'a> { } impl<'a> JniGrpcReplyListener<'a> { - fn do_on_reply(&mut self, reply: GrpcReply) -> Result<(), BridgeLayerError> { - self.env.borrow_mut().with_local_frame(8, |env| { + fn do_on_reply(&mut self, reply: GrpcReply) -> SignalJniResult<()> { + self.env.borrow_mut().with_local_frame(8, "on_reply", |env| { let jni_reply = reply.convert_into(env)?; let callback_args = jni_args!(( jni_reply => org.signal.libsignal.grpc.SignalRpcReply, @@ -39,9 +39,9 @@ impl<'a> JniGrpcReplyListener<'a> { }) } - fn do_on_error(&mut self, error: String) -> Result<(), BridgeLayerError> { - self.env.borrow_mut().with_local_frame(8, |env| { - let message = env.new_string(error.to_string())?; + fn do_on_error(&mut self, error: String) -> SignalJniResult<()> { + self.env.borrow_mut().with_local_frame(8, "on_error", |env| { + let message = env.new_string(error.to_string()).check_exceptions(env, "on_error")?; let callback_args = jni_args!(( message => java.lang.String, ) -> void); diff --git a/rust/bridge/shared/types/src/jni/quic.rs b/rust/bridge/shared/types/src/jni/quic.rs index ff6d466621..12c372f233 100644 --- a/rust/bridge/shared/types/src/jni/quic.rs +++ b/rust/bridge/shared/types/src/jni/quic.rs @@ -27,9 +27,9 @@ impl<'a> JniQuicCallbackListener<'a> { } impl<'a> JniQuicCallbackListener<'a> { - fn do_on_data(&mut self, data: Vec) -> Result<(), BridgeLayerError> { - self.env.borrow_mut().with_local_frame(8, |env| { - let bytes = env.byte_array_from_slice(&data)?; + fn do_on_data(&mut self, data: Vec) -> SignalJniResult<()> { + self.env.borrow_mut().with_local_frame(8, "on_data", |env| { + let bytes = env.byte_array_from_slice(&data).check_exceptions(env, "on_data")?; let callback_args = jni_args!(( bytes => [byte], ) -> void); diff --git a/rust/chat/Cargo.toml b/rust/chat/Cargo.toml index 736ef0d50e..109d31fce5 100644 --- a/rust/chat/Cargo.toml +++ b/rust/chat/Cargo.toml @@ -20,7 +20,7 @@ prost = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["sync","rt","rt-multi-thread"] } tokio-stream = { workspace = true } -tonic = { version = "0.11.0", features = [ "tls", "tls-webpki-roots" ] } +tonic = { version = "0.12.3", features = [ "tls", "tls-webpki-roots" ] } [build-dependencies] -tonic-build = "0.11.0" +tonic-build = "0.12.3" diff --git a/rust/chat/build.rs b/rust/chat/build.rs index 25764e8704..d0b2e40eb8 100644 --- a/rust/chat/build.rs +++ b/rust/chat/build.rs @@ -15,7 +15,7 @@ fn main() -> Result<(), Box> { ]; tonic_build::configure() .build_server(false) - .compile(&protos, &["../../proto"])?; + .compile_protos(&protos, &["../../proto"])?; for proto in &protos { println!("cargo:rerun-if-changed={}", proto); } diff --git a/rust/grpc/Cargo.toml b/rust/grpc/Cargo.toml index 7577b96ba2..fe7a104447 100644 --- a/rust/grpc/Cargo.toml +++ b/rust/grpc/Cargo.toml @@ -20,7 +20,7 @@ prost = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["sync","rt","rt-multi-thread"] } tokio-stream = { workspace = true } -tonic = { version = "0.11.0", features = [ "tls", "tls-webpki-roots" ] } +tonic = { version = "0.12.3", features = [ "tls", "tls-webpki-roots" ] } [build-dependencies] -tonic-build = "0.11.0" +tonic-build = "0.12.3" diff --git a/rust/grpc/build.rs b/rust/grpc/build.rs index 43587424a5..54438dc63e 100644 --- a/rust/grpc/build.rs +++ b/rust/grpc/build.rs @@ -9,7 +9,7 @@ fn main() -> Result<(), Box> { ]; tonic_build::configure() .build_server(false) - .compile(&protos, &["src/proto"])?; + .compile_protos(&protos, &["src/proto"])?; for proto in &protos { println!("cargo:rerun-if-changed={}", proto); }