From 045fd730ae826d2098970758328c8683e4a0222a Mon Sep 17 00:00:00 2001 From: Satya Kwok <119509589+satyakwok@users.noreply.github.com> Date: Tue, 12 May 2026 06:06:38 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20bump=20tonic=200.12=E2=86=920.14=20+=20?= =?UTF-8?q?tonic-web-wasm-client=200.6=E2=86=920.9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tonic 0.14 split prost integration into separate `tonic-prost` (runtime) + `tonic-prost-build` (codegen) crates. tonic itself no longer exposes the `prost` feature. build.rs now calls tonic-prost-build::configure(). API surface is unchanged from the previous tonic-build call. tonic-web-wasm-client 0.9 is the version that pairs with tonic 0.14. Native + wasm32-unknown-unknown both compile clean. Supersedes #7 (tonic), #8 (tonic-web-wasm-client), #9 (prost), #10 (tonic-build). --- Cargo.lock | 82 +++++++++++++++++++++++++++++++++++++----------------- Cargo.toml | 9 +++--- build.rs | 2 +- 3 files changed, 63 insertions(+), 30 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aa32e98..6003571 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -329,11 +329,12 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "petgraph" -version = "0.7.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", + "hashbrown 0.15.5", "indexmap", ] @@ -384,9 +385,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" dependencies = [ "bytes", "prost-derive", @@ -394,15 +395,14 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" +checksum = "343d3bd7056eda839b03204e68deff7d1b13aba7af2b2fd16890697274262ee7" dependencies = [ "heck", "itertools", "log", "multimap", - "once_cell", "petgraph", "prettyplease", "prost", @@ -414,9 +414,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" dependencies = [ "anyhow", "itertools", @@ -427,9 +427,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.13.5" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +checksum = "8991c4cbdb8bc5b11f0b074ffe286c30e523de90fee5ba8132f1399f23cb3dd7" dependencies = [ "prost", ] @@ -510,7 +510,8 @@ dependencies = [ "hex", "prost", "tonic", - "tonic-build", + "tonic-prost", + "tonic-prost-build", "tonic-web-wasm-client", ] @@ -573,6 +574,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" + [[package]] name = "tempfile" version = "3.27.0" @@ -588,18 +595,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.69" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.69" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -628,9 +635,9 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.3" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ "async-trait", "base64", @@ -640,7 +647,7 @@ dependencies = [ "http-body-util", "percent-encoding", "pin-project", - "prost", + "sync_wrapper", "tokio-stream", "tower-layer", "tower-service", @@ -649,9 +656,32 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.3" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +checksum = "c68f61875ac5293cf72e6c8cf0158086428c82c37229e98c840878f1706b0322" +dependencies = [ + "prettyplease", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tonic-prost" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0" +dependencies = [ + "bytes", + "prost", + "tonic", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "654e5643eff75d7f8c99197ce1440ed19a3474eada74c12bbac488b2cafdae27" dependencies = [ "prettyplease", "proc-macro2", @@ -659,13 +689,15 @@ dependencies = [ "prost-types", "quote", "syn", + "tempfile", + "tonic-build", ] [[package]] name = "tonic-web-wasm-client" -version = "0.6.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8957be1a1c7aa12d4c9d67882060dd57aed816bbc553fa60949312e839f4a8ea" +checksum = "3c0469c353de5f665c95f898074b5b004b500c6722214c3249f1dc79c0a2a3f6" dependencies = [ "base64", "byteorder", @@ -838,9 +870,9 @@ dependencies = [ [[package]] name = "wasm-streams" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" dependencies = [ "futures-util", "js-sys", diff --git a/Cargo.toml b/Cargo.toml index 6c659f3..119ed22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,13 +14,14 @@ readme = "README.md" crate-type = ["cdylib", "rlib"] [dependencies] -tonic = { version = "0.12", default-features = false, features = ["prost", "codegen"] } -tonic-web-wasm-client = "0.6" -prost = "0.13" +tonic = { version = "0.14", default-features = false, features = ["codegen"] } +tonic-prost = "0.14" +tonic-web-wasm-client = "0.9" +prost = "0.14" hex = "0.4" [build-dependencies] -tonic-build = { version = "0.12", default-features = false, features = ["prost"] } +tonic-prost-build = { version = "0.14", default-features = false } [lints.rust] unsafe_code = "forbid" diff --git a/build.rs b/build.rs index a45b594..9fc61f2 100644 --- a/build.rs +++ b/build.rs @@ -8,7 +8,7 @@ fn main() -> Result<(), Box> { // GetValidatorSetRequest.at_height). protoc 3.15+ accepts this by // default; ubuntu-22.04 still ships 3.12.4 in apt and needs the // flag. Harmless on newer protoc. - tonic_build::configure() + tonic_prost_build::configure() .build_server(false) .protoc_arg("--experimental_allow_proto3_optional") .compile_protos(&["proto/sentrix.proto"], &["proto"])?;