Skip to content

Commit 0b2ef7e

Browse files
committed
Remove tokio & async-std features
We only use tokio now
1 parent 755de96 commit 0b2ef7e

4 files changed

Lines changed: 14 additions & 44 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,8 @@ jobs:
3232
components: rustfmt
3333
- name: Run tests
3434
run: |
35-
cargo check --no-default-features --features tokio
36-
cargo check --no-default-features --features tokio,sparse
37-
cargo check --no-default-features --features async-std
38-
cargo check --no-default-features --features async-std,sparse
39-
cargo test --no-default-features --features tokio
40-
cargo test --no-default-features --features tokio,sparse
41-
cargo test --no-default-features --features async-std
42-
cargo test --no-default-features --features async-std,sparse
35+
cargo check --no-default-features
36+
cargo check --no-default-features --features sparse
4337
4438
test-windows:
4539
runs-on: windows-latest
@@ -51,14 +45,8 @@ jobs:
5145
components: rustfmt
5246
- name: Run tests
5347
run: |
54-
cargo check --no-default-features --features tokio
55-
cargo check --no-default-features --features tokio,sparse
56-
cargo check --no-default-features --features async-std
57-
cargo check --no-default-features --features async-std,sparse
58-
cargo test --no-default-features --features tokio
59-
cargo test --no-default-features --features tokio,sparse
60-
cargo test --no-default-features --features async-std
61-
cargo test --no-default-features --features async-std,sparse
48+
cargo check --no-default-features
49+
cargo check --no-default-features --features sparse
6250
6351
test-macos:
6452
runs-on: macos-latest
@@ -70,14 +58,8 @@ jobs:
7058
components: rustfmt
7159
- name: Run tests
7260
run: |
73-
cargo check --no-default-features --features tokio
74-
cargo check --no-default-features --features tokio,sparse
75-
cargo check --no-default-features --features async-std
76-
cargo check --no-default-features --features async-std,sparse
77-
cargo test --no-default-features --features tokio
78-
cargo test --no-default-features --features tokio,sparse
79-
cargo test --no-default-features --features async-std
80-
cargo test --no-default-features --features async-std,sparse
61+
cargo check --no-default-features
62+
cargo check --no-default-features --features sparse
8163
8264
build-extra:
8365
runs-on: ubuntu-latest
@@ -87,14 +69,12 @@ jobs:
8769
- uses: dtolnay/rust-toolchain@stable
8870
- name: Build benches
8971
run: |
90-
cargo build --benches --no-default-features --features tokio
91-
cargo build --benches --no-default-features --features async-std
72+
cargo build --benches --no-default-features
73+
cargo build --benches --no-default-features --features sparse
9274
- name: Build release
9375
run: |
94-
cargo build --release --no-default-features --features tokio
95-
cargo build --release --no-default-features --features tokio,sparse
96-
cargo build --release --no-default-features --features async-std
97-
cargo build --release --no-default-features --features async-std,sparse
76+
cargo build --release --no-default-features
77+
cargo build --release --no-default-features --features sparse
9878
9979
lint:
10080
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919

2020
### Removed
2121

22+
* Drop all `async-std` stuff, we're only using `tokio` now. This removes both the `tokio` and `async-std` features.
2223

2324

2425
## [3.0.1] - 2024-01-09

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ edition = "2024"
1313
mkdirp = "1.0.0"
1414
random-access-storage = "=6.0.0-alpha"
1515
async-lock = "3"
16-
tokio = { version = "1.27.0", optional = true, features = ["fs", "io-util"] }
16+
tokio = { version = "1.27.0", features = ["fs", "io-util"] }
1717
libc = { version = "0.2", optional = true }
1818

1919
[target.'cfg(windows)'.dependencies]
@@ -28,8 +28,8 @@ criterion = { version = "0.4", features = ["async_tokio"] }
2828
tokio-test = "0.4"
2929

3030
[features]
31-
default = ["sparse", "tokio"]
32-
sparse = ["libc"]
31+
default = ["sparse"]
32+
sparse = ["dep:libc"]
3333

3434
[[bench]]
3535
name = "sync"

src/lib.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@
1717
//!
1818
//! **NB**: If this is on, `unsafe` code is used to make direct platform-specific calls!
1919
//!
20-
//! ### `async-std` (default)
21-
//!
22-
//! Use the async-std runtime, on by default. Either this or `tokio` is mandatory.
23-
//!
24-
//! ### `tokio`
25-
//!
26-
//! Use the tokio runtime. Either this or `async_std` is mandatory.
27-
//!
2820
//! ## Examples
2921
//!
3022
//! Reading, writing, deleting and truncating:
@@ -91,9 +83,6 @@
9183
//! }
9284
//! # }
9385
94-
#[cfg(not(feature = "tokio"))]
95-
compile_error!("feature `random-access-disk/tokio` must be enabled.");
96-
9786
use async_lock::Mutex;
9887
use random_access_storage::{BoxFuture, RandomAccess, RandomAccessError};
9988
use std::{

0 commit comments

Comments
 (0)