Skip to content

Commit 0e9a67c

Browse files
committed
Merge branch 'master' into reduce-timer-contention
2 parents 54f89f9 + 5a709e3 commit 0e9a67c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1534
-281
lines changed

.cirrus.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ task:
2929
# Free the disk space before the next build,
3030
# otherwise cirrus-ci complains about "No space left on device".
3131
- cargo clean
32-
# Enable all unstable features, including io_uring, because it supports
33-
# x86_64 FreeBSD.
34-
- RUSTFLAGS="$RUSTFLAGS --cfg tokio_unstable" RUSTDOCFLAGS="$RUSTDOCFLAGS --cfg tokio_unstable" cargo test --all --all-features
32+
# Enable all unstable features except `taskdump`, which is Linux-only.
33+
- |
34+
RUSTFLAGS="$RUSTFLAGS --cfg tokio_unstable" \
35+
RUSTDOCFLAGS="$RUSTDOCFLAGS --cfg tokio_unstable" \
36+
cargo test \
37+
--features $TOKIO_STABLE_FEATURES,io-uring,tracing
3538
3639
task:
3740
name: FreeBSD docs
@@ -48,7 +51,9 @@ task:
4851
rustc --version
4952
test_script:
5053
- . $HOME/.cargo/env
51-
- cargo doc --lib --no-deps --all-features --document-private-items
54+
# We use `--features $TOKIO_STABLE_FEATURES,io-uring,tracing` instead of
55+
# `--all-features` to exclude `taskdump`, which is Linux-only.
56+
- cargo doc --lib --no-deps --features $TOKIO_STABLE_FEATURES,io-uring,tracing --document-private-items
5257

5358
task:
5459
name: FreeBSD 32-bit

.github/workflows/ci.yml

Lines changed: 62 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
RUSTUP_WINDOWS_PATH_ADD_BIN: 1
1717
# Change to specific Rust release to pin
1818
rust_stable: stable
19-
rust_nightly: nightly-2025-01-25
19+
rust_nightly: nightly-2025-10-12
2020
# Pin a specific miri version
2121
rust_miri_nightly: nightly-2025-06-02
2222
rust_clippy: '1.88'
@@ -309,17 +309,14 @@ jobs:
309309
- name: test tokio full --cfg unstable --cfg taskdump
310310
run: |
311311
set -euxo pipefail
312-
# taskdump is an unstable feature, but it can only be enabled
313-
# by --cfg tokio_taskdump, not by a feature flag, so we can
314-
# use $TOKIO_STABLE_FEATURES here.
315-
cargo nextest run --features $TOKIO_STABLE_FEATURES
312+
cargo nextest run --features $TOKIO_STABLE_FEATURES,taskdump
316313
cargo test --doc --features $TOKIO_STABLE_FEATURES
317314
working-directory: tokio
318315
env:
319-
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings
316+
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
320317
# in order to run doctests for unstable features, we must also pass
321318
# the unstable cfg to RustDoc
322-
RUSTDOCFLAGS: --cfg tokio_unstable --cfg tokio_taskdump
319+
RUSTDOCFLAGS: --cfg tokio_unstable
323320

324321
check-unstable-mt-counters:
325322
name: check tokio full --internal-mt-counters
@@ -484,7 +481,7 @@ jobs:
484481

485482
- uses: Swatinem/rust-cache@v2
486483
# We don't use --all-features since io-uring will be enabled and is not supported on those targets.
487-
- run: cargo check --workspace --features full,test-util --target ${{ matrix.target }}
484+
- run: cargo check --workspace --features $TOKIO_STABLE_FEATURES --target ${{ matrix.target }}
488485
env:
489486
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
490487

@@ -496,8 +493,9 @@ jobs:
496493
matrix:
497494
target:
498495
- name: x86_64-unknown-haiku
499-
- name: armv7-sony-vita-newlibeabihf
500-
exclude_features: "process,signal,rt-process-signal,full"
496+
exclude_features: "taskdump" # taskdump is only available on Linux
497+
# - name: armv7-sony-vita-newlibeabihf
498+
# exclude_features: "process,signal,rt-process-signal,full,taskdump"
501499
steps:
502500
- uses: actions/checkout@v5
503501
- name: Install Rust ${{ env.rust_nightly }}
@@ -522,14 +520,14 @@ jobs:
522520
include:
523521
- target: i686-unknown-linux-gnu
524522
os: ubuntu-latest
525-
rustflags: --cfg tokio_taskdump
523+
extra_features: "taskdump"
526524
- target: armv5te-unknown-linux-gnueabi
527525
os: ubuntu-latest
528526
- target: armv7-unknown-linux-gnueabihf
529527
os: ubuntu-24.04-arm
530528
- target: aarch64-unknown-linux-gnu
531529
os: ubuntu-24.04-arm
532-
rustflags: --cfg tokio_taskdump
530+
extra_features: "io-uring,taskdump"
533531
- target: aarch64-pc-windows-msvc
534532
os: windows-11-arm
535533
steps:
@@ -554,13 +552,15 @@ jobs:
554552
- name: Tests run with all features (including parking_lot)
555553
run: |
556554
set -euxo pipefail
557-
# We use `--features "full,test-util"` instead of `--all-features` since
558-
# `--all-features` includes `io_uring`, which is not available on all targets.
559-
cargo nextest run -p tokio --features full,test-util --target ${{ matrix.target }}
560-
cargo test --doc -p tokio --features full,test-util --target ${{ matrix.target }}
555+
# We use `--features "$TOKIO_STABLE_FEATURES"` instead of `--all-features` since
556+
# `--all-features` includes `io_uring` and `taskdump`,
557+
# which is not available on all targets.
558+
cargo nextest run -p tokio --features $TOKIO_STABLE_FEATURES,${{ matrix.extra_features }} --target ${{ matrix.target }}
559+
cargo test --doc -p tokio --features $TOKIO_STABLE_FEATURES,${{ matrix.extra_features }} --target ${{ matrix.target }}
561560
env:
562561
RUST_TEST_THREADS: 1
563-
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_tuning_tests ${{ matrix.rustflags }}
562+
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_tuning_tests
563+
RUSTDOCFLAGS: --cfg tokio_unstable -Dwarnings
564564

565565
cross-test-without-parking_lot:
566566
needs: basics
@@ -570,14 +570,14 @@ jobs:
570570
include:
571571
- target: i686-unknown-linux-gnu
572572
os: ubuntu-latest
573-
rustflags: --cfg tokio_taskdump
573+
extra_features: "taskdump"
574574
- target: armv5te-unknown-linux-gnueabi
575575
os: ubuntu-latest
576576
- target: armv7-unknown-linux-gnueabihf
577577
os: ubuntu-24.04-arm
578578
- target: aarch64-unknown-linux-gnu
579579
os: ubuntu-24.04-arm
580-
rustflags: --cfg tokio_taskdump
580+
extra_features: "io-uring,taskdump"
581581
- target: aarch64-pc-windows-msvc
582582
os: windows-11-arm
583583
steps:
@@ -606,13 +606,15 @@ jobs:
606606
- name: Tests run with all features (without parking_lot)
607607
run: |
608608
set -euxo pipefail
609-
# We use `--features "full,test-util"` instead of `--all-features` since
610-
# `--all-features` includes `io_uring`, which is not available on all targets.
611-
cargo nextest run -p tokio --features full,test-util --target ${{ matrix.target }}
612-
cargo test --doc -p tokio --features full,test-util --target ${{ matrix.target }}
609+
# We use `--features "$TOKIO_STABLE_FEATURES"` instead of `--all-features` since
610+
# `--all-features` includes `io_uring` and `taskdump`,
611+
# which is not available on all targets.
612+
cargo nextest run -p tokio --features $TOKIO_STABLE_FEATURES,${{ matrix.extra_features }} --target ${{ matrix.target }}
613+
cargo test --doc -p tokio --features $TOKIO_STABLE_FEATURES,${{ matrix.extra_features }} --target ${{ matrix.target }}
613614
env:
614615
RUST_TEST_THREADS: 1
615616
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_parking_lot --cfg tokio_no_tuning_tests ${{ matrix.rustflags }}
617+
RUSTDOCFLAGS: --cfg tokio_unstable -Dwarnings
616618

617619
# See https://github.com/tokio-rs/tokio/issues/5187
618620
no-atomic-u64-test:
@@ -640,13 +642,12 @@ jobs:
640642
- uses: Swatinem/rust-cache@v2
641643
- name: test tokio --all-features
642644
run: |
643-
# We use `--features "full,test-util"` instead of `--all-features` since
644-
# `--all-features` includes `io_uring`, which is not available on all targets.
645-
cargo nextest run -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --features full,test-util
646-
cargo test --doc -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --features full,test-util
645+
cargo nextest run -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --features $TOKIO_STABLE_FEATURES,taskdump
646+
cargo test --doc -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --features $TOKIO_STABLE_FEATURES,taskdump
647647
env:
648648
RUST_TEST_THREADS: 1
649-
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings --cfg tokio_no_tuning_tests
649+
RUSTDOCFLAGS: --cfg tokio_unstable
650+
RUSTFLAGS: --cfg tokio_unstable -Dwarnings --cfg tokio_no_tuning_tests
650651

651652
no-atomic-u64-check:
652653
name: Check tokio --feature-powerset --depth 2 on i686-unknown-linux-gnu without AtomicU64
@@ -672,18 +673,24 @@ jobs:
672673
# We use `--skip io-uring` since io-uring crate doesn't provide a binding for the i686 target.
673674
run: cargo hack check -Zbuild-std --target target-specs/i686-unknown-linux-gnu.json -p tokio --feature-powerset --skip io-uring --depth 2 --keep-going
674675
env:
675-
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings
676+
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
676677

677678
features:
678-
name: features ${{ matrix.name }}
679+
name: features exclude ${{ matrix.name }}
679680
needs: basics
680681
runs-on: ubuntu-latest
681682
strategy:
682683
matrix:
683684
include:
684-
- { name: "", rustflags: "", exclude_features: "io-uring" }
685-
- { name: "--unstable", rustflags: "--cfg tokio_unstable -Dwarnings", exclude_features: "" }
686-
- { name: "--unstable --taskdump", rustflags: "--cfg tokio_unstable -Dwarnings --cfg tokio_taskdump", exclude_features: "" }
685+
- name: ""
686+
rustflags: ""
687+
exclude_features: "io-uring,taskdump"
688+
- name: "--unstable"
689+
rustflags: "--cfg tokio_unstable -Dwarnings"
690+
exclude_features: "io-uring,taskdump"
691+
- name: "--unstable io-uring,taskdump"
692+
rustflags: "--cfg tokio_unstable -Dwarnings"
693+
exclude_features: ""
687694
steps:
688695
- uses: actions/checkout@v5
689696
- name: Install Rust ${{ env.rust_nightly }}
@@ -749,7 +756,7 @@ jobs:
749756
cargo hack check -p tokio-macros -p tokio-stream -p tokio-util -p tokio-test --all-features --ignore-private
750757
- name: "check --all-features --unstable -Z minimal-versions"
751758
env:
752-
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings
759+
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
753760
run: |
754761
# Remove dev-dependencies from Cargo.toml to prevent the next `cargo update`
755762
# from determining minimal versions based on dev-dependencies.
@@ -795,7 +802,7 @@ jobs:
795802
- name: "clippy --all --all-features --unstable"
796803
run: cargo clippy --all --tests --no-deps --all-features
797804
env:
798-
RUSTFLAGS: --cfg tokio_unstable --cfg tokio_taskdump -Dwarnings
805+
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
799806

800807
docs:
801808
name: docs
@@ -804,9 +811,9 @@ jobs:
804811
matrix:
805812
run:
806813
- os: windows-latest
814+
extra_features: "tracing"
807815
- os: ubuntu-latest
808-
RUSTFLAGS: --cfg tokio_taskdump
809-
RUSTDOCFLAGS: --cfg tokio_taskdump
816+
extra_features: "tracing,io-uring,taskdump"
810817

811818
steps:
812819
- uses: actions/checkout@v5
@@ -816,11 +823,10 @@ jobs:
816823
toolchain: ${{ env.rust_nightly }}
817824
- uses: Swatinem/rust-cache@v2
818825
- name: "doc --lib --all-features"
819-
run: |
820-
cargo doc --lib --no-deps --all-features --document-private-items
826+
run: cargo doc --lib --no-deps --document-private-items --features $TOKIO_STABLE_FEATURES,${{ matrix.run.extra_features }}
821827
env:
822-
RUSTFLAGS: --cfg docsrs --cfg tokio_unstable ${{ matrix.run.RUSTFLAGS }}
823-
RUSTDOCFLAGS: --cfg docsrs --cfg tokio_unstable -Dwarnings ${{ matrix.run.RUSTDOCFLAGS }}
828+
RUSTFLAGS: --cfg docsrs --cfg tokio_unstable
829+
RUSTDOCFLAGS: --cfg docsrs --cfg tokio_unstable -Dwarnings
824830

825831
loom-compile:
826832
name: build loom tests
@@ -1083,26 +1089,31 @@ jobs:
10831089
runs-on: ${{ matrix.os }}
10841090
strategy:
10851091
matrix:
1086-
os:
1087-
- windows-latest
1088-
- ubuntu-latest
1089-
rust:
1090-
# `check-external-types` requires a specific Rust nightly version. See
1091-
# the README for details: https://github.com/awslabs/cargo-check-external-types
1092-
- nightly-2024-06-30
1092+
include:
1093+
- os: windows-latest
1094+
# Windows neither supports io-uring nor taskdump.
1095+
extra_features: "tracing"
1096+
- os: ubuntu-latest
1097+
# includes all unstable features.
1098+
extra_features: "tracing,io-uring,taskdump"
10931099
steps:
10941100
- uses: actions/checkout@v5
10951101
- name: Install Rust ${{ matrix.rust }}
10961102
uses: dtolnay/rust-toolchain@stable
10971103
with:
1098-
toolchain: ${{ matrix.rust }}
1104+
# `check-external-types` requires a specific Rust nightly version. See
1105+
# the README for details: https://github.com/awslabs/cargo-check-external-types
1106+
toolchain: nightly-2025-08-06
10991107
- uses: Swatinem/rust-cache@v2
11001108
- name: Install cargo-check-external-types
11011109
uses: taiki-e/cache-cargo-install-action@v1
11021110
with:
1103-
tool: cargo-check-external-types@0.1.13
1111+
tool: cargo-check-external-types@0.3.0
11041112
- name: check-external-types
1105-
run: cargo check-external-types --features $TOKIO_STABLE_FEATURES
1113+
env:
1114+
RUSTFLAGS: --cfg tokio_unstable -Dwarnings
1115+
RUSTDOCFLAGS: --cfg tokio_unstable
1116+
run: cargo check-external-types --features $TOKIO_STABLE_FEATURES,${{ matrix.extra_features }}
11061117
working-directory: tokio
11071118

11081119
check-fuzzing:

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ unexpected_cfgs = { level = "warn", check-cfg = [
2727
'cfg(tokio_internal_mt_counters)',
2828
'cfg(tokio_no_parking_lot)',
2929
'cfg(tokio_no_tuning_tests)',
30-
'cfg(tokio_taskdump)',
3130
'cfg(tokio_unstable)',
3231
'cfg(target_os, values("cygwin"))',
3332
] }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Make sure you activated the full features of the tokio crate on Cargo.toml:
5656

5757
```toml
5858
[dependencies]
59-
tokio = { version = "1.47.1", features = ["full"] }
59+
tokio = { version = "1.48.0", features = ["full"] }
6060
```
6161
Then, on your main.rs:
6262

deny.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ allow = [
99
"Apache-2.0",
1010
]
1111
exceptions = [
12-
{ allow = ["Unicode-3.0", "Unicode-DFS-2016"], crate = "unicode-ident" },
12+
{ allow = ["Unicode-3.0"], crate = "unicode-ident" },
1313
]
1414

1515
[bans]

examples/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ httparse = "1.0"
2424
httpdate = "1.0"
2525
once_cell = "1.5.2"
2626

27+
[target.'cfg(all(tokio_unstable, target_os = "linux"))'.dev-dependencies]
28+
tokio = { version = "1.0.0", path = "../tokio", features = ["full", "tracing", "taskdump"] }
29+
2730
[target.'cfg(windows)'.dev-dependencies.windows-sys]
28-
version = "0.59"
31+
version = "0.61"
2932

3033
[[example]]
3134
name = "chat"

examples/dump.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
55
#[cfg(all(
66
tokio_unstable,
7-
tokio_taskdump,
87
target_os = "linux",
98
any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64")
109
))]
@@ -82,7 +81,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
8281

8382
#[cfg(not(all(
8483
tokio_unstable,
85-
tokio_taskdump,
8684
target_os = "linux",
8785
any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64")
8886
)))]

netlify.toml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
[build]
2-
# TODO: unfreeze toolchain
3-
# error[E0557]: feature has been removed
4-
# --> /opt/buildhome/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/lock_api-0.4.13/src/lib.rs:89:29
5-
# |
6-
# 89 | #![cfg_attr(docsrs, feature(doc_auto_cfg))]
7-
# | ^^^^^^^^^^^^ feature has been removed
8-
# |
9-
# = note: removed in 1.58.0; see <https://github.com/rust-lang/rust/pull/138907; for more information
10-
# = note: merged into `doc_cfg`
112
command = """
12-
rustup install nightly-2025-01-25 --profile minimal && cargo doc --no-deps --all-features
3+
rustup install nightly --profile minimal && cargo doc --no-deps --all-features
134
"""
145
publish = "target/doc"
156

167
[build.environment]
178
RUSTDOCFLAGS="""
189
--cfg docsrs \
1910
--cfg tokio_unstable \
20-
--cfg tokio_taskdump \
2111
"""
22-
RUSTFLAGS="--cfg tokio_unstable --cfg tokio_taskdump --cfg docsrs"
12+
RUSTFLAGS="""
13+
--cfg docsrs \
14+
--cfg tokio_unstable
15+
"""
2316

2417
[[redirects]]
2518
from = "/"

0 commit comments

Comments
 (0)