Skip to content

Commit 26f8016

Browse files
authored
chore: remove async-std-related docs and cfgs (#450)
1 parent ac086a4 commit 26f8016

3 files changed

Lines changed: 5 additions & 21 deletions

File tree

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<br>
77

88
- *macro-less and type-safe* APIs for intuitive and declarative code
9-
- *various runtimes* are supported:`tokio`, `async-std`, `smol`, `nio`, `glommio` and `worker` (Cloudflare Workers), `lambda` (AWS Lambda)
9+
- *various runtimes* are supported:`tokio`, `smol`, `nio`, `glommio` and `worker` (Cloudflare Workers), `lambda` (AWS Lambda)
1010
- extremely fast, no-network testing, well-structured middlewares, Server-Sent Events, WebSocket, highly integrated OpenAPI document generation, ...
1111

1212
<div align="right">
@@ -67,10 +67,9 @@ Hello, your_name!
6767

6868
## Feature flags
6969

70-
### `"rt_tokio"`, `"rt_async-std"`, `"rt_smol"`, `"rt_nio"`, `"rt_glommio"` : native async runtime
70+
### `"rt_tokio"`, `"rt_smol"`, `"rt_nio"`, `"rt_glommio"` : native async runtime
7171

7272
- [tokio](https://github.com/tokio-rs/tokio)
73-
- [async-std](https://github.com/async-rs/async-std)
7473
- [smol](https://github.com/smol-rs/smol)
7574
- [nio](https://github.com/nurmohammed840/nio)
7675
- [glommio](https://github.com/DataDog/glommio)

ohkami/src/lib.rs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//! <br>
1010
//!
1111
//! - *macro-less and type-safe* APIs for intuitive and declarative code
12-
//! - *various runtimes* are supported:`tokio`, `async-std`, `smol`, `nio`, `glommio` and `worker` (Cloudflare Workers), `lambda` (AWS Lambda)
12+
//! - *various runtimes* are supported:`tokio`, `smol`, `nio`, `glommio` and `worker` (Cloudflare Workers), `lambda` (AWS Lambda)
1313
//! - extremely fast, no-network testing, well-structured middlewares, Server-Sent Events, WebSocket, highly integrated OpenAPI document generation, ...
1414
//!
1515
//! See [GitHub repo](https://github.com/ohkami-rs/ohkami) for details!
@@ -38,8 +38,6 @@
3838
mod __rt__ {
3939
#[cfg(feature="rt_tokio")]
4040
pub(crate) use tokio::net::{TcpListener, TcpStream, ToSocketAddrs};
41-
#[cfg(feature="rt_async-std")]
42-
pub(crate) use async_std::net::{TcpListener, TcpStream, ToSocketAddrs};
4341
#[cfg(feature="rt_smol")]
4442
pub(crate) use smol::net::{TcpListener, TcpStream, AsyncToSocketAddrs as ToSocketAddrs};
4543
#[cfg(feature="rt_nio")]
@@ -68,8 +66,6 @@ mod __rt__ {
6866

6967
#[cfg(feature="rt_tokio")]
7068
pub(crate) use tokio::time::sleep;
71-
#[cfg(feature="rt_async-std")]
72-
pub(crate) use async_std::task::sleep;
7369
#[cfg(feature="rt_smol")]
7470
pub(crate) async fn sleep(duration: std::time::Duration) {
7571
smol::Timer::after(duration).await;
@@ -99,8 +95,6 @@ mod __rt__ {
9995

10096
#[cfg(feature="rt_tokio")]
10197
pub(crate) use tokio::io::AsyncReadExt as AsyncRead;
102-
#[cfg(feature="rt_async-std")]
103-
pub(crate) use async_std::io::ReadExt as AsyncRead;
10498
#[cfg(feature="rt_smol")]
10599
pub(crate) use futures_util::AsyncReadExt as AsyncRead;
106100
#[cfg(feature="rt_nio")]
@@ -110,16 +104,14 @@ mod __rt__ {
110104

111105
#[cfg(feature="rt_tokio")]
112106
pub(crate) use tokio::io::AsyncWriteExt as AsyncWrite;
113-
#[cfg(feature="rt_async-std")]
114-
pub(crate) use async_std::io::WriteExt as AsyncWrite;
115107
#[cfg(feature="rt_smol")]
116108
pub(crate) use futures_util::AsyncWriteExt as AsyncWrite;
117109
#[cfg(feature="rt_nio")]
118110
pub(crate) use tokio::io::AsyncWriteExt as AsyncWrite;
119111
#[cfg(feature="rt_glommio")]
120112
pub(crate) use futures_util::AsyncWriteExt as AsyncWrite;
121113

122-
#[cfg(any(feature="rt_tokio", feature="rt_async-std", feature="rt_smol", feature="rt_nio"))]
114+
#[cfg(any(feature="rt_tokio", feature="rt_smol", feature="rt_nio"))]
123115
mod task {
124116
pub trait Task: std::future::Future<Output: Send + 'static> + Send + 'static {}
125117
impl<F: std::future::Future<Output: Send + 'static> + Send + 'static> Task for F {}
@@ -133,9 +125,6 @@ mod __rt__ {
133125
#[cfg(feature="rt_tokio")]
134126
tokio::task::spawn(task);
135127

136-
#[cfg(feature="rt_async-std")]
137-
async_std::task::spawn(task);
138-
139128
#[cfg(feature="rt_smol")]
140129
smol::spawn(task).detach();
141130

@@ -156,9 +145,6 @@ mod __rt__ {
156145
.unwrap()
157146
.block_on(future);
158147

159-
#[cfg(feature="rt_async-std")]
160-
return async_std::task::block_on(future);
161-
162148
#[cfg(feature="rt_smol")]
163149
return smol::block_on(future);
164150

@@ -175,7 +161,6 @@ mod __rt__ {
175161

176162
pub(crate) const PORT: u16 = {
177163
#[cfg(feature="rt_tokio") ] {if cfg!(feature="tls") {9443} else {3001}}
178-
#[cfg(feature="rt_async-std")] {3002}
179164
#[cfg(feature="rt_smol") ] {3003}
180165
#[cfg(feature="rt_nio") ] {3004}
181166
#[cfg(feature="rt_glommio") ] {3005}

ohkami/src/ohkami/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ impl Ohkami {
564564

565565
while let Some(accept) = ctrl_c.until_interrupt(listener.accept()).await {
566566
let (connection, addr) = {
567-
#[cfg(any(feature="rt_tokio", feature="rt_async-std", feature="rt_smol", feature="rt_nio"))] {
567+
#[cfg(any(feature="rt_tokio", feature="rt_smol", feature="rt_nio"))] {
568568
let Ok((connection, addr)) = accept else {continue};
569569
(connection, addr)
570570
}

0 commit comments

Comments
 (0)