Skip to content

Commit d6803ad

Browse files
authored
Merge pull request ohkami-rs#30 from ohkami-rs/chore/remove-nio-async-std
chore: remove `nio` and `async-std` support
2 parents 4806745 + 3ec7079 commit d6803ad

File tree

4 files changed

+6
-30
lines changed

4 files changed

+6
-30
lines changed

Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ features = ["rt_tokio"]
1717

1818
[dependencies]
1919
tokio = { optional = true, version = "1", features = ["net", "io-util", "sync", "time"] }
20-
async-std = { optional = true, version = "1" }
2120
smol = { optional = true, version = "2" }
22-
nio = { optional = true, version = "0.0" }
2321
glommio = { optional = true, version = "0.9" }
2422

2523
futures-util = { optional = true, version = "0.3", default-features = false, features = ["io"] }
@@ -29,9 +27,7 @@ base64 = { version = "0.22" }
2927

3028
[features]
3129
rt_tokio = ["__splitref__", "dep:tokio","tokio/net","tokio/io-util","tokio/sync","tokio/time"]
32-
rt_async-std = ["__clone__", "dep:async-std"]
3330
rt_smol = ["__clone__", "dep:smol"]
34-
rt_nio = ["__splitref__", "dep:nio", "dep:tokio","tokio/io-util"]
3531
rt_glommio = ["__splitref__", "dep:glommio", "dep:futures-util"]
3632

3733
### internal ###

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
* Minimal and Efficient : minimal codebase to provide efficient, memory-safe WebSocket handling.
1717

18-
* Multi Environment : `tokio`, `async-std`, `smol`, `nio`, `glommio` are supported as async runtime ( by feature flags `rt_{name}` ).
18+
* Multi Environment : `tokio`, `smol`, `glommio` are supported as async runtime ( by feature flags `rt_{name}` ).
1919

2020
## Note
2121

Taskfile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 3
33
tasks:
44
CI:
55
deps:
6-
- for: [tokio, async-std, smol, nio, glommio]
6+
- for: [tokio, smol, glommio]
77
task: test:rt
88
vars: { rt: '{{.ITEM}}' }
99
- task: test:no_rt

src/lib.rs

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//!
1616
//! * Minimal and Efficient : minimal codebase to provide efficient, memory-safe WebSocket handling.
1717
//!
18-
//! * Multiple Environment : `tokio`, `async-std`, `smol`, `nio`, `glommio` are supported as async runtime ( by feature flags `rt_{name}` ).
18+
//! * Multiple Environment : `tokio`, `smol`, `glommio` are supported as async runtime ( by feature flags `rt_{name}` ).
1919
//!
2020
//! ## Note
2121
//!
@@ -26,11 +26,9 @@
2626
//! * Doesn't builtins `wss://` support.
2727
2828
#[cfg(any(
29-
all(feature="rt_tokio", any(feature="rt_async-std", feature="rt_smol", feature="rt_nio", feature="rt_glommio" )),
30-
all(feature="rt_async-std", any(feature="rt_smol", feature="rt_nio", feature="rt_glommio", feature="rt_tokio" )),
31-
all(feature="rt_smol", any(feature="rt_nio", feature="rt_glommio", feature="rt_tokio", feature="rt_async-std")),
32-
all(feature="rt_nio", any(feature="rt_glommio", feature="rt_tokio", feature="rt_async-std", feature="rt_smol" )),
33-
all(feature="rt_glommio", any(feature="rt_tokio", feature="rt_async-std", feature="rt_smol", feature="rt_nio" )),
29+
all(feature="rt_tokio", any(feature="rt_smol", feature="rt_glommio")),
30+
all(feature="rt_smol", any(feature="rt_glommio", feature="rt_tokio" )),
31+
all(feature="rt_glommio", any(feature="rt_tokio", feature="rt_smol" )),
3432
))]
3533
compile_error! {"More than one runtime feature flags can't be activated"}
3634

@@ -45,15 +43,6 @@ mod runtime {
4543
tokio::time::sleep
4644
};
4745

48-
#[cfg(feature="rt_async-std")]
49-
pub use {
50-
async_std::net::TcpStream,
51-
async_std::io::ReadExt as AsyncRead,
52-
async_std::io::WriteExt as AsyncWrite,
53-
async_std::sync::RwLock,
54-
async_std::task::sleep
55-
};
56-
5746
#[cfg(feature="rt_smol")]
5847
pub use {
5948
smol::net::TcpStream,
@@ -66,15 +55,6 @@ mod runtime {
6655
smol::Timer::after(duration).await;
6756
}
6857

69-
#[cfg(feature="rt_nio")]
70-
pub use {
71-
nio::net::TcpStream,
72-
tokio::io::AsyncReadExt as AsyncRead,
73-
tokio::io::AsyncWriteExt as AsyncWrite,
74-
tokio::sync::RwLock,
75-
nio::time::sleep
76-
};
77-
7858
#[cfg(feature="rt_glommio")]
7959
pub use {
8060
glommio::net::TcpStream,

0 commit comments

Comments
 (0)