From 263ef8a8979eafcf8cef4f5545b3865a674f5e9b Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Fri, 29 Dec 2023 20:38:51 -0800 Subject: [PATCH] Prepare for v0.34.0 release --- README.md | 2 +- RELEASES.md | 20 ++++++++++++++++++++ example-service/Cargo.toml | 2 +- plugins/Cargo.toml | 2 +- tarpc/Cargo.toml | 4 ++-- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index def018de..6db83b57 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Some other features of tarpc: Add to your `Cargo.toml` dependencies: ```toml -tarpc = "0.33" +tarpc = "0.34" ``` The `tarpc::service` attribute expands to a collection of items that form an rpc service. diff --git a/RELEASES.md b/RELEASES.md index 8ea6ca37..48ca96a7 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,23 @@ +## 0.34.0 (2023-12-29) + +### Breaking Changes + +- `#[tarpc::server]` is no more! Service traits now use async fns. +- `Channel::execute` no longer spawns request handlers. Async-fn-in-traits makes it impossible to + add a Send bound to the future returned by `Serve::serve`. Instead, `Channel::execute` returns a + stream of futures, where each future is a request handler. To achieve the former behavior: + ```rust + channel.execute(server.serve()) + .for_each(|rpc| { tokio::spawn(rpc); }) + ``` + +### New Features + +- Request hooks are added to the serve trait, so that it's easy to hook in cross-cutting + functionality look throttling, authorization, etc. +- The Client trait is back! This makes it possible to hook in generic client functionality like load + balancing, retries, etc. + ## 0.33.0 (2023-04-01) ### Breaking Changes diff --git a/example-service/Cargo.toml b/example-service/Cargo.toml index 51fc578d..cd279fe1 100644 --- a/example-service/Cargo.toml +++ b/example-service/Cargo.toml @@ -21,7 +21,7 @@ futures = "0.3" opentelemetry = { version = "0.21.0" } opentelemetry-jaeger = { version = "0.20.0", features = ["rt-tokio"] } rand = "0.8" -tarpc = { version = "0.33", path = "../tarpc", features = ["full"] } +tarpc = { version = "0.34", path = "../tarpc", features = ["full"] } tokio = { version = "1", features = ["macros", "net", "rt-multi-thread"] } tracing = { version = "0.1" } tracing-opentelemetry = "0.22.0" diff --git a/plugins/Cargo.toml b/plugins/Cargo.toml index 8684b54f..2230958c 100644 --- a/plugins/Cargo.toml +++ b/plugins/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tarpc-plugins" -version = "0.12.0" +version = "0.13.0" rust-version = "1.56" authors = ["Adam Wright ", "Tim Kuehn "] edition = "2021" diff --git a/tarpc/Cargo.toml b/tarpc/Cargo.toml index 87808776..879c01bc 100644 --- a/tarpc/Cargo.toml +++ b/tarpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tarpc" -version = "0.33.0" +version = "0.34.0" rust-version = "1.58.0" authors = [ "Adam Wright ", @@ -49,7 +49,7 @@ pin-project = "1.0" rand = "0.8" serde = { optional = true, version = "1.0", features = ["derive"] } static_assertions = "1.1.0" -tarpc-plugins = { path = "../plugins", version = "0.12" } +tarpc-plugins = { path = "../plugins", version = "0.13" } thiserror = "1.0" tokio = { version = "1", features = ["time"] } tokio-util = { version = "0.7.3", features = ["time"] }