Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
9c880b0
ci: skip workspace semver on release pushes (#8390)
fly1d Aug 27, 2026
705989c
ci: pin Wasmtime version(s) in CI (#8314)
dicej Jul 23, 2026
16a6a23
ci: pin cargo-fuzz to 0.13.1 for check-fuzzing (#8403)
Darksonn Sep 3, 2026
66f836e
tests: mark failing taskdump tests as #[ignore] (#8403)
Darksonn Sep 3, 2026
4917528
rt: make `enable_io` available whenever `rt` is enabled (#8387)
rifuki Sep 5, 2026
060cc4e
wasm: support the wasm32-unknown-emscripten target (#8281)
guybedford Sep 5, 2026
26e6ee8
Merge 'tokio-1.47.x' into 'tokio-1.51.x' (#8412)
Darksonn Sep 5, 2026
787697f
runtime: fix misleading signal driver panic message (#8419)
philphauler Sep 6, 2026
0069aef
io: retry `ErrorKind::Interrupted` in `read_exact` (#8417)
philphauler Sep 6, 2026
7d0d729
sync: clarify panic behavior of `broadcast::channel()` (#8420)
philphauler Sep 6, 2026
a316820
tests: handle EPERM in io_uring_supported helper (#8416)
philphauler Sep 6, 2026
dde3f86
time: handle wrapped top-level timer-wheel slots (#8334)
meskill Sep 7, 2026
3e6eb7d
ci: use Rust 1.98 for wasm32-wasip2 (#8412)
Darksonn Sep 5, 2026
b62fa16
Revert "ci: use Rust 1.98 for wasm32-wasip2 (#8412)" (#8425)
Darksonn Sep 7, 2026
e456a12
Revert "tests: mark failing taskdump tests as #[ignore] (#8403)" (#8425)
Darksonn Sep 7, 2026
e4be0cf
Revert "ci: pin cargo-fuzz to 0.13.1 for check-fuzzing (#8403)" (#8425)
Darksonn Sep 7, 2026
b9c0753
Merge 'tokio-1.51.x' into 'master' (#8425)
Darksonn Sep 7, 2026
bd8f8f2
net: remove leftover debug loop counter in try_read_buf (#8426)
Darksonn Sep 7, 2026
0d38ab5
sync: make `tracing_sync` tests synchronous (#8427)
Darksonn Sep 7, 2026
855e5b8
tracing: serialize `tracing_task` tests (#8428)
Darksonn Sep 7, 2026
bbb5076
runtime: fix `spawn_blocking` hang when only scheduler workers exist …
Revantark Sep 7, 2026
6b3c90c
rt: move the multi-thread inject queue to its own mutex (#8382)
alex Sep 7, 2026
483e4b9
stream: handle overflowing timer durations (#8354)
fallintoplace Sep 7, 2026
13d4800
time: avoid interval deadline overflow (#8385)
BreezeDelegate Sep 7, 2026
1309451
runtime: fix idle bookkeeping when a task dump wakes parked workers (…
yzfeng2020 Sep 8, 2026
6bea73e
time: clean up Instant overflow prevention (#8128)
vilgotf Sep 8, 2026
d6bf379
sync: avoid atomic reader count in broadcast slots (#8357)
fallintoplace Sep 8, 2026
8388d34
io: retry on `ErrorKind::Interrupted` in `read_to_end` (#8432)
cuishuang Sep 9, 2026
346dd03
rt: add `Builder::max_io_events_per_busy_tick` (#8410)
so-ant Sep 9, 2026
022c004
io: flush the writer when the reader stalls in `copy_buf` (#8424)
rifuki Sep 9, 2026
5d1551f
ci: update FreeBSD release version to 14.5 in CI (#8436)
asomers Sep 10, 2026
dc44bdd
runtime: replace `RunResult` with `ControlFlow` (#8133)
vilgotf Sep 10, 2026
03f1f6b
runtime: stabilize `worker_index` (#8431)
dajiaohuang Sep 10, 2026
d3587da
fs: fix coop for emscripten fs shim (#8422)
charlespers Sep 10, 2026
decfd11
rt: decide auto-boxing of spawned futures at monomorphization time (#…
bmaurer Sep 10, 2026
18f7448
ci: require a completion marker from the io_uring kernel test guest (…
glaziermag Sep 10, 2026
050cd3a
rt: add test for I/O shutdown waker cycles (#8360)
tomatotomata Sep 10, 2026
0e25691
io: keep the shutdown bit when clearing readiness (#8435)
so-ant Sep 10, 2026
4fcaed9
net: start accepted sockets as readable and writable (#8435)
so-ant Sep 10, 2026
af8544a
benches: add net_accept (accept to first read and write) (#8435)
so-ant Sep 7, 2026
bd5604a
net: start `UnixStream::pair` and `UnixDatagram::pair` sockets as wri…
so-ant Sep 11, 2026
7bb6f07
rt: add a dispatch enum for the multi-thread inject queue (#8443)
alex Sep 11, 2026
7466529
tests: skip the io_uring fs assertions when fs falls back to spawn_bl…
so-ant Sep 11, 2026
9e56e03
net: enable `send_to_recv_closed_returns_err` test for WASI (#8447)
dicej Sep 12, 2026
6719243
fs: reject zero max buffer size (#8449)
fallintoplace Sep 12, 2026
5354246
io: retry interrupted errors in `read_until` (#8448)
fallintoplace Sep 12, 2026
ce2399a
io: make `copy_buf` cooperative (#8459)
Dev-next-gen Sep 13, 2026
0469d47
time: use ticks instead of Instant in internal timer APIs (#8457)
vilgotf Sep 13, 2026
2025ddd
io: retry interrupted writes when flushing `BufWriter` (#8455)
fallintoplace Sep 13, 2026
0241639
io: retry interrupted writes in `write_all` and `write_all_buf` (#8453)
fallintoplace Sep 13, 2026
7f6bb9a
io: reject zero buf size on `copy_bidirectional_with_sizes` (#8454)
fallintoplace Sep 13, 2026
6276684
stream: implement FusedStream for StreamNotifyClose (#8452)
fallintoplace Sep 13, 2026
6c2041c
stream: implement `Throttle::size_hint` (#8473)
fallintoplace Sep 14, 2026
da21efb
rt: panic when `max_io_events_per_tick` is zero (#8476)
fallintoplace Sep 14, 2026
8146318
stream: report exact size hint for Pending (#8474)
fallintoplace Sep 14, 2026
eb9cdf2
stream: implement FusedStream for Empty and Once (#8478)
darkraider01 Sep 14, 2026
7d2a0f1
time: create timer inside `Throttle` stream lazily (#8468)
fallintoplace Sep 16, 2026
98ca0cf
sync: add `watch::Receiver::is_closed` (#8481)
fallintoplace Sep 16, 2026
685eed9
sync: add `SemaphorePermit::semaphore()` (#8482)
fallintoplace Sep 16, 2026
6db25e7
ci: bump actions/setup-node from 4 to 7 (#8442)
dependabot[bot] Sep 16, 2026
66e1387
ci: bump mymindstorm/setup-emsdk from 14 to 16 (#8441)
dependabot[bot] Sep 16, 2026
17fd980
ci: use emscripten-core/setup-emsdk (#8488)
guybedford Sep 17, 2026
41e2e5c
Merge 'tokio-1.51.x' into 'tokio-1.53.x' (#8491)
Darksonn Sep 17, 2026
9d77962
readme: add 1.53 as LTS release (#8490)
Darksonn Sep 17, 2026
cf782c5
Merge 'tokio-1.53.x' into 'master' (#8490)
Darksonn Sep 17, 2026
ce5f9e3
wasm: support JSPI for Emscripten target
guybedford Sep 18, 2026
be4cf73
rt: unpark JSPI parks from later activations
guybedford Sep 18, 2026
0b39587
rt: park through JSPI without the rt feature
guybedford Sep 18, 2026
9351408
rt: fix spelling in jspi docs
guybedford Sep 18, 2026
182f3a7
tests: skip emscripten unwind assertions under panic=abort
guybedford Sep 18, 2026
4bf72a1
tests: skip rt_emscripten_jspi when JSPI is not linked
guybedford Sep 18, 2026
c2a3138
tests: spawn onto a parked runtime from a host activation
guybedford Sep 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 68 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ env:
rust_nightly: nightly-2025-10-12
# Pin a specific miri version
rust_miri_nightly: nightly-2026-06-29
rust_emscripten_nightly: nightly-2026-08-17
emsdk_version: '6.0.8'
rust_clippy: '1.88'
# When updating this, also update:
# - README.md
Expand Down Expand Up @@ -509,7 +511,7 @@ jobs:
# We don't care about the semver of unstable tokio features.
features: ${{ env.TOKIO_STABLE_FEATURES }}
- name: Check semver for rest of the workspace
if: ${{ !startsWith(github.event.pull_request.base.ref, 'tokio-1.') }}
if: ${{ !startsWith(github.event.pull_request.base.ref, 'tokio-1.') && !startsWith(github.ref_name, 'tokio-1.') }}
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
rust-toolchain: ${{ env.rust_stable }}
Expand Down Expand Up @@ -1180,9 +1182,9 @@ jobs:
- name: Install cargo-nextest, wasmtime
uses: taiki-e/install-action@v2
with:
# Wasmtime v47.0.0 or later should work, but we stick with a known,
# Wasmtime v48.0.0 or later should work, but we stick with a known,
# specific version to avoid surprises:
tool: cargo-nextest,wasmtime-cli@47.0.2
tool: cargo-nextest,wasmtime-cli@48.0.2

- uses: Swatinem/rust-cache@v2

Expand All @@ -1193,6 +1195,66 @@ jobs:
RUSTFLAGS: --cfg tokio_unstable
CARGO_TARGET_WASM32_WASIP2_RUNNER: wasmtime run -Sinherit-network

wasm32-unknown-emscripten:
name: test tokio for wasm32-unknown-emscripten
needs: basics
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_stable }}
targets: wasm32-unknown-emscripten

- name: Install Emscripten
uses: emscripten-core/setup-emsdk@v16
with:
version: ${{ env.emsdk_version }}

- uses: actions/setup-node@v7
with:
node-version: 26

- uses: Swatinem/rust-cache@v2

- name: Install cargo-hack
uses: taiki-e/install-action@v2
with:
tool: cargo-hack

- name: Check tokio feature matrix for emscripten
run: cargo hack check -p tokio --each-feature --exclude-features full,net,process,signal,rt-multi-thread,io-uring,taskdump,schedule-latency --target wasm32-unknown-emscripten
working-directory: tokio

- name: Test tokio for emscripten (JSPI)
run: cargo test -p tokio --target wasm32-unknown-emscripten --features "rt,time,sync,macros,fs,io-util,io-std,test-util" --tests
working-directory: tokio
env:
CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER: node
RUSTFLAGS: "-Dwarnings -Clink-args=-sALLOW_MEMORY_GROWTH=1 -Clink-args=-sEXIT_RUNTIME=1 -Clink-args=-sJSPI -Clink-args=-sSTACK_SIZE=1048576"

- name: Test tokio for emscripten (non-JSPI)
run: cargo test -p tokio --target wasm32-unknown-emscripten --features "rt,time,sync,macros,fs,io-util,io-std,test-util" --test rt_emscripten_block_on --test sync_emscripten_blocking
working-directory: tokio
env:
CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER: node
RUSTFLAGS: "-Dwarnings -Clink-args=-sALLOW_MEMORY_GROWTH=1 -Clink-args=-sEXIT_RUNTIME=1 -Clink-args=-sSTACK_SIZE=1048576"

- name: Install Rust ${{ env.rust_emscripten_nightly }}
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: ${{ env.rust_emscripten_nightly }}
targets: wasm32-unknown-emscripten
components: rust-src

- name: Test tokio for emscripten (pthreads)
run: cargo +${{ env.rust_emscripten_nightly }} test -Zbuild-std=std,panic_abort -p tokio --target wasm32-unknown-emscripten --features "rt,rt-multi-thread,time,sync,macros,fs,io-util,io-std,test-util" --tests
working-directory: tokio
env:
CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER: node
RUSTFLAGS: "-Dwarnings -Ctarget-feature=+atomics,+bulk-memory,+mutable-globals -Clink-args=-pthread -Clink-args=-sPTHREAD_POOL_SIZE=8 -Clink-args=-sINITIAL_MEMORY=134217728 -Clink-args=-sEXIT_RUNTIME=1 -Clink-args=-sSTACK_SIZE=1048576"

check-external-types:
name: check-external-types (${{ matrix.os }})
needs: basics
Expand Down Expand Up @@ -1352,7 +1414,7 @@ jobs:
- name: Test in FreeBSD
uses: vmactions/freebsd-vm@v1
with:
release: '14.4'
release: '14.5'
envs: "TOKIO_STABLE_FEATURES RUSTFLAGS"
sync: rsync
copyback: false
Expand Down Expand Up @@ -1381,7 +1443,7 @@ jobs:
RUSTFLAGS: --cfg docsrs --cfg tokio_unstable
RUSTDOCFLAGS: --cfg docsrs --cfg tokio_unstable -Dwarnings
with:
release: '14.4'
release: '14.5'
envs: "TOKIO_STABLE_FEATURES RUSTDOCFLAGS RUSTFLAGS"
sync: rsync
copyback: false
Expand All @@ -1406,7 +1468,7 @@ jobs:
- name: Test in FreeBSD
uses: vmactions/freebsd-vm@v1
with:
release: '14.4'
release: '14.5'
envs: "TOKIO_STABLE_FEATURES RUSTFLAGS"
sync: rsync
copyback: false
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/uring-kernel-version-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
mount -t sysfs sysfs /sys
mkdir -p /tmp && mount -t tmpfs -o mode=1777 tmpfs /tmp
for f in /bin/tests/*; do RUST_BACKTRACE=1 "$f" ; done
echo "ALL_TESTS_COMPLETED"
EOF
chmod +x initramfs/init

Expand All @@ -94,11 +95,14 @@ jobs:
set -euo pipefail

set +e
# 3 GiB guest (the runner has 16 GB): the initramfs holds ~760 MB of
# unstripped test binaries, and `open_many_files` in `fs_uring` had
# 200-340 MB of anon RSS when the 1 GiB guest OOM-killed it.
qemu-system-x86_64 \
-kernel linux-${{ env.KERNEL_VERSION }}/arch/x86/boot/bzImage \
-initrd initramfs.cpio.gz \
-append "console=ttyS0 rootfstype=ramfs panic=1" \
-nographic -no-reboot -m 1024 -action panic=exit-failure 2>&1 | tee qemu-output.log
-nographic -no-reboot -m 3072 -action panic=exit-failure 2>&1 | tee qemu-output.log
qemu_status=${PIPESTATUS[0]} tee_status=${PIPESTATUS[1]}
set -e

Expand All @@ -115,6 +119,14 @@ jobs:
if grep -q "test result: FAILED" qemu-output.log; then
echo "tests reported failures"
exit 1
else
echo "all tests passed"
fi

# A binary killed before it prints its summary (OOM, panic in init)
# never writes `test result: FAILED`, so also require the marker that
# init prints after the last binary.
if ! grep -q "ALL_TESTS_COMPLETED" qemu-output.log; then
echo "tests did not run to completion"
exit 1
fi

echo "all tests passed"
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,18 @@ warrants a patch release with a fix for the bug, it will be backported and
released as a new patch release for each LTS minor version. Our current LTS
releases are:

* `1.47.x` - LTS release until September 2026. (MSRV 1.70)
* `1.51.x` - LTS release until March 2027. (MSRV 1.71)
* `1.53.x` - LTS release until September 2027. (MSRV 1.71)

Each LTS release will continue to receive backported fixes for at least a year.
If you wish to use a fixed minor release in your project, we recommend that you
use an LTS release.

To use a fixed minor version, you can specify the version with a tilde. For
example, to specify that you wish to use the newest `1.47.x` patch release, you
example, to specify that you wish to use the newest `1.51.x` patch release, you
can use the following dependency specification:
```text
tokio = { version = "~1.47", features = [...] }
tokio = { version = "~1.51", features = [...] }
```

### Previous LTS releases
Expand All @@ -242,6 +242,7 @@ tokio = { version = "~1.47", features = [...] }
* `1.36.x` - LTS release until March 2025.
* `1.38.x` - LTS release until July 2025.
* `1.43.x` - LTS release until March 2026.
* `1.47.x` - LTS release until September 2026.

## License

Expand Down
5 changes: 5 additions & 0 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,10 @@ name = "remote_spawn"
path = "remote_spawn.rs"
harness = false

[[bench]]
name = "net_accept"
path = "net_accept.rs"
harness = false

[lints]
workspace = true
Loading