From 3c0702cfcda2ead8e0a58489ea1bdd4ba051e80b Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sat, 30 Aug 2025 02:25:46 +0100 Subject: [PATCH] chore(actix-rt): prepare release 2.11.0 --- Cargo.lock | 31 ++++++++++++++----------------- Cargo.toml | 2 ++ actix-rt/CHANGES.md | 4 ++++ actix-rt/Cargo.toml | 10 +++++----- actix-rt/README.md | 4 ++-- actix-rt/src/lib.rs | 26 +++++++++++++++++--------- 6 files changed, 44 insertions(+), 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a9d70ee..8f0ef6e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -34,7 +34,7 @@ dependencies = [ [[package]] name = "actix-rt" -version = "2.10.0" +version = "2.11.0" dependencies = [ "actix-macros", "futures-core", @@ -406,18 +406,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.45" +version = "4.5.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc0e74a703892159f5ae7d3aac52c8e6c392f5ae5f359c70b5881d60aaac318" +checksum = "2c5e4fcf9c21d2e544ca1ee9d8552de13019a42aa7dbf32747fa7aaf1df76e57" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.5.44" +version = "4.5.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8" +checksum = "fecb53a0e6fcfb055f686001bc2e2592fa527efaf38dbe81a6a9563562e57d41" dependencies = [ "anstyle", "clap_lex", @@ -721,7 +721,7 @@ dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasi 0.14.3+wasi-0.2.4", ] [[package]] @@ -1394,9 +1394,9 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" dependencies = [ "zerovec", ] @@ -2515,11 +2515,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.2+wasi-0.2.4" +version = "0.14.3+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "6a51ae83037bdd272a9e28ce236db8c07016dd0d50c27038b3f407533c030c95" dependencies = [ - "wit-bindgen-rt", + "wit-bindgen", ] [[package]] @@ -2927,13 +2927,10 @@ dependencies = [ ] [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.3", -] +checksum = "052283831dbae3d879dc7f51f3d92703a316ca49f91540417d38591826127814" [[package]] name = "writeable" diff --git a/Cargo.toml b/Cargo.toml index a1de08cb..b45f24e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,8 @@ members = [ ] [workspace.package] +homepage = "https://actix.rs" +repository = "https://github.com/actix/actix-net" license = "MIT OR Apache-2.0" edition = "2021" rust-version = "1.75" diff --git a/actix-rt/CHANGES.md b/actix-rt/CHANGES.md index 65d2b543..1ad3dd0f 100644 --- a/actix-rt/CHANGES.md +++ b/actix-rt/CHANGES.md @@ -2,6 +2,10 @@ ## Unreleased +## 2.11.0 + +- Implement `ActixStream` for `tokio::io::BufReader`. +- Deprecate the `pin` re-export. - Minimum supported Rust version (MSRV) is now 1.75. ## 2.10.0 diff --git a/actix-rt/Cargo.toml b/actix-rt/Cargo.toml index ec022119..39902421 100644 --- a/actix-rt/Cargo.toml +++ b/actix-rt/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "actix-rt" -version = "2.10.0" +version = "2.11.0" authors = ["Nikolay Kim ", "Rob Ede "] description = "Tokio-based single-threaded async runtime for the Actix ecosystem" -keywords = ["async", "futures", "io", "runtime"] -homepage = "https://actix.rs" -repository = "https://github.com/actix/actix-net" categories = ["network-programming", "asynchronous"] -license = "MIT OR Apache-2.0" +keywords = ["async", "futures", "io", "runtime"] +homepage.workspace = true +repository.workspace = true +license.workspace = true edition.workspace = true rust-version.workspace = true diff --git a/actix-rt/README.md b/actix-rt/README.md index 6ceed8b5..f1618fe6 100644 --- a/actix-rt/README.md +++ b/actix-rt/README.md @@ -3,11 +3,11 @@ > Tokio-based single-threaded async runtime for the Actix ecosystem. [![crates.io](https://img.shields.io/crates/v/actix-rt?label=latest)](https://crates.io/crates/actix-rt) -[![Documentation](https://docs.rs/actix-rt/badge.svg?version=2.10.0)](https://docs.rs/actix-rt/2.10.0) +[![Documentation](https://docs.rs/actix-rt/badge.svg?version=2.11.0)](https://docs.rs/actix-rt/2.11.0) [![Version](https://img.shields.io/badge/rustc-1.46+-ab6000.svg)](https://blog.rust-lang.org/2020/03/12/Rust-1.46.html) ![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/actix-rt.svg)
-[![dependency status](https://deps.rs/crate/actix-rt/2.10.0/status.svg)](https://deps.rs/crate/actix-rt/2.10.0) +[![dependency status](https://deps.rs/crate/actix-rt/2.11.0/status.svg)](https://deps.rs/crate/actix-rt/2.11.0) ![Download](https://img.shields.io/crates/d/actix-rt.svg) [![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/WghFtEH6Hb) diff --git a/actix-rt/src/lib.rs b/actix-rt/src/lib.rs index 9dce19b8..fb795f0d 100644 --- a/actix-rt/src/lib.rs +++ b/actix-rt/src/lib.rs @@ -61,6 +61,7 @@ mod arbiter; mod runtime; mod system; +#[deprecated(since = "2.11.0", note = "Prefer `std::pin::pin!`.")] pub use tokio::pin; use tokio::task::JoinHandle; @@ -87,10 +88,11 @@ pub mod net { use std::{ future::Future, io, + pin::pin, task::{Context, Poll}, }; - use tokio::io::{AsyncRead, AsyncWrite, Interest}; + use tokio::io::{AsyncRead, AsyncWrite, BufReader, Interest}; #[cfg(unix)] pub use tokio::net::{UnixDatagram, UnixListener, UnixStream}; pub use tokio::{ @@ -115,14 +117,12 @@ pub mod net { impl ActixStream for TcpStream { fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll> { let ready = self.ready(Interest::READABLE); - tokio::pin!(ready); - ready.poll(cx) + pin!(ready).poll(cx) } fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll> { let ready = self.ready(Interest::WRITABLE); - tokio::pin!(ready); - ready.poll(cx) + pin!(ready).poll(cx) } } @@ -130,14 +130,12 @@ pub mod net { impl ActixStream for UnixStream { fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll> { let ready = self.ready(Interest::READABLE); - tokio::pin!(ready); - ready.poll(cx) + pin!(ready).poll(cx) } fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll> { let ready = self.ready(Interest::WRITABLE); - tokio::pin!(ready); - ready.poll(cx) + pin!(ready).poll(cx) } } @@ -150,6 +148,16 @@ pub mod net { (**self).poll_write_ready(cx) } } + + impl ActixStream for BufReader { + fn poll_read_ready(&self, cx: &mut Context<'_>) -> Poll> { + self.get_ref().poll_read_ready(cx) + } + + fn poll_write_ready(&self, cx: &mut Context<'_>) -> Poll> { + self.get_ref().poll_write_ready(cx) + } + } } pub mod time {