Skip to content

Commit

Permalink
Remove tokio feature
Browse files Browse the repository at this point in the history
Due to tokio 0.2 being very outdatet.
The code is left in, for when I implement tokio 1.0 support.
  • Loading branch information
tormol committed Aug 14, 2023
1 parent 6bef82c commit d72ba55
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 27 deletions.
3 changes: 0 additions & 3 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ task:
- cargo check --features mio-uds
- cargo check --features mio_07
- cargo check --features mio_08
- cargo check --features tokio
test_script:
- cargo test --features "mio mio-uds mio_07" --no-fail-fast
before_cache_script:
Expand All @@ -77,12 +76,10 @@ task:
- # no version of mio-uds compiles
- cargo build -Z minimal-versions --features mio_07
- cargo build -Z minimal-versions --features mio_08
- cargo build -Z minimal-versions --features tokio
test_script:
- cargo test -Z minimal-versions --features mio --no-fail-fast -- --test-threads=1
- cargo test -Z minimal-versions --features mio_07 --no-fail-fast -- --test-threads=1
- cargo test -Z minimal-versions --features mio_08 --no-fail-fast -- --test-threads=1
- cargo test -Z minimal-versions --features tokio --no-fail-fast -- --test-threads=1
before_cache_script:
- rm -rf $HOME/.cargo/registry/index

Expand Down
10 changes: 1 addition & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ categories = ["os::unix-apis", "asynchronous"]
edition = "2021"
exclude = ["tests", "src/bin"]

[features]
tokio = ["futures", "mio", "tokio_02"]

[target."cfg(unix)".dependencies]
libc = "0.2.90" # peer credentials for DragonFly BSD and NetBSD, SO_PEERSEC on all Linux architectures
# enabling this feature implements the extension traits for mio-uds types
Expand All @@ -28,11 +25,6 @@ mio_07 = { package = "mio", version = "0.7.6", features = ["os-ext", "net"], opt
# enabling this feature implements the extension traits for mio 0.8's unix socket types
# and Source for this crate's non-blocking seqpacket types.
mio_08 = { package = "mio", version = "0.8", features = ["os-ext", "net"], optional = true }
futures = {version = "0.3", optional=true}
tokio_02 = {package="tokio", version = "0.2", features = ["io-driver"], optional=true}

[target."cfg(unix)".dev-dependencies]
tokio_02 = {package="tokio", version = "0.2", features = ["macros", "rt-core"]}

[package.metadata.docs.rs]
features = ["mio-uds", "mio", "mio_07", "tokio"]
features = ["mio-uds", "mio", "mio_07"]
13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Also, some OSes might return the original file descriptor without cloning it if
| **fd-passing** | Yes | Yes | Yes | Yes | Yes | Yes | No |
| **abstract addresses** | Yes | N/A | N/A | N/A | N/A | N/A | N/A |
| **mio (0.6 & 0.7 & 0.8 & uds)** | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| **tokio** | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| **Tested?** | Locally + CI | CI | CI | CI | Manually<sup>\*</sup> | Manually<sup>\*</sup> | Manually<sup>\*</sup> |

<sup>\*</sup>: Not tested since v0.2.6. (but (cross)checked on CI.)
Expand Down Expand Up @@ -102,18 +101,6 @@ uds = {version="0.3.0", features=["mio_07"]}
uds = {version="0.3.0", features=["mio_08"]}
```

## tokio integration

Futures-aware seqpacket types can optionally be used with [tokio](https://github.com/tokio-rs/tokio)
(version 0.2):

To enable it, add this to Cargo.toml:

```toml
[dependencies]
uds = {version="0.3.0", features=["tokio"]}
```

## Minimum Rust version

The minimum Rust version is 1.63.
Expand Down
2 changes: 0 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ mod helpers;
mod ancillary;
mod traits;
mod seqpacket;
#[cfg(feature="tokio")]
pub mod tokio;

pub use addr::{UnixSocketAddr, UnixSocketAddrRef, AddrName};
pub use traits::{UnixListenerExt, UnixStreamExt, UnixDatagramExt};
Expand Down

0 comments on commit d72ba55

Please sign in to comment.