tokio-util
Additional utilities for working with Tokio.
0.7.19
727M downloads/mo
#110 most downloaded on crates.io
tokio-rs/tokio
What this package is like to depend on
Last release 1 months ago
21 Jul 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 37 of 38 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
38 releases · first in 2018
3 releases in the last 12 months
see the full history below
Release timeline
38 releases · Feb 2018 to Jul 2026Releases
latest 38-
0.7.1921 Jul 2026Release notes
Open source →Added
- io: add
write_all_vectored(#7768, #8159) - sync: add
DropGuard::tokenfor cancellation tokens (#8226) - sync: implement
PartialEqandEqforCancellationToken(#8110) - task: add
AbortOnDrop(#7855) - task: add
JoinMap::try_join_next(#8099)
Changed
- codec: use
libc::memchrforLinesCodecdelimiter scan (#8141)
Fixed
- codec: fix
is_readablewhen buffer is not empty (#7912) - task: avoid replacing the
JoinQueuewaker intry_join_next(#8279) - time: wake
DelayQueueafter resetting to expired (#8274)
Documented
- codec: document
UdpFrameddecoder errors (#8248)
- io: add
-
0.7.1804 Jan 2026Release notes
Open source →Added
- io: add
tokio_util::io::simplex(#7565)
Changed
- task: remove unnecessary trait bounds on the
Debugimplementation forJoinQueueandAbortOnDropHandle(#7720)
Fixed
- deps: bump
tokioto1.44.0(#7733)
Documented
- io: add
-
0.7.1702 Nov 2025Release notes
Open source →The MSRV is increased to 1.71.
Added
- codec: add
{FramedRead,FramedWrite}::into_parts()(#7566) - time: add
#[track_caller]toFutureExt::timeout(#7588) - task: add
tokio_util::task::JoinQueue(#7590)
Changed
- codec: remove unnecessary trait bounds on all Framed constructors (#7716)
Documented
- codec: add
-
0.7.1603 Aug 2025Release notes
Open source →Added
- codec: add
FramedWrite::with_capacity(#7493) - future: add adapters of
CancellationTokenforFutureExt(#7475) - sync: add
DropGuardRefforCancellationToken(#7407) - task: add
AbortOnDropHandle::detach(#7400) - task: stabilise
JoinMap(#7075)
Changed
- codec: also apply capacity to read buffer in
Framed::with_capacity(#7500) - sync: make
CancellationToken::run_until_cancelledbiased towards the token (#7462) - task: remove raw-entry feature from hashbrown dep (#7252)
Documented
- codec: add
-
0.7.1523 Apr 2025Release notes
Open source →Fixed
- task: properly handle removed entries in
JoinMap(#7264)
Updated
- deps: update hashbrown to 0.15 (#7219)
Documented
- task: explicitly state that
TaskTrackerdoes not abort tasks on Drop (#7223)
- task: properly handle removed entries in
-
0.7.1413 Mar 2025Release notes
Open source →Added
- io: add
get_refandget_mutforSyncIoBridge(#7128) - io: add
read_exact_arc(#7165) - sync: add
CancellationToken::run_until_cancelled_owned(#7081)
Changed
- codec: optimize buffer reserve for
AnyDelimiterCodec::encode(#7188) - either: enable
Eitherto use underlyingAsyncWriteimplementation (#7025)
Fixed
Documented
- io: add docs for
SyncIoBridgewith examples and alternatives (#6815)
Internal
- io: add
-
0.7.1304 Dec 2024Release notes
Open source →Fixed
- codec: fix incorrect handling of invalid utf-8 in
LinesCodec::decode_eof(#7011)
- codec: fix incorrect handling of invalid utf-8 in
-
0.7.1204 Sep 2024Release notes
Open source →This release bumps the MSRV to 1.70. (#6645)
Added
- sync: Add
run_until_cancelledtotokio_util::sync::CancellationToken(#6618) - task: add
AbortOnDropHandletype (#6786)
Changed
- deps: no default features for hashbrown (#6541)
- time: wake
DelayQueuewhen removing last item (#6752) - deps: enable the full feature when compiled for the playground (#6818)
Documented
- task: fix typo in
TaskTrackerdocs (#6792)
- sync: Add
-
0.7.1104 May 2024Release notes
Open source →This release updates the MSRV to 1.63. (#6126)
Added
- either: implement
SinkforEither(#6239) - time: add
DelayQueue::deadline(#6163) - time: add
FutureExt::timeout(#6276)
Changed
- codec: assert compatibility between
LengthDelimitedCodecoptions (#6414) - codec: make tracing feature optional for codecs (#6434)
- io: add
T: ?Sizedtotokio_util::io::poll_read_buf(#6441) - sync: remove
'staticbound onimpl Sink for PollSender(#6397)
Documented
- either: implement
-
0.7.1025 Oct 2023Release notes
Open source →Added
- task: add
TaskTracker(#6033) - task: add
JoinMap::keys(#6046) - io: implement
SeekforSyncIoBridge(#6058)
Changed
- deps: update hashbrown to 0.14 (#6102)
- task: add
-
0.7.920 Sep 2023Release notes
Open source →Added
- io: add passthrough
AsyncRead/AsyncWritetoInspectWriter/InspectReader(#5739) - task: add spawn blocking methods to
JoinMap(#5797) - io: pass through traits for
StreamReaderandSinkWriter(#5941) - io: add
SyncIoBridge::into_inner(#5971)
Fixed
- sync: handle possibly dangling reference safely (#5812)
- util: fix broken intra-doc link (#5849)
- compat: fix clippy warnings (#5891)
Documented
- codec: Specify the line ending of
LinesCodec(#5982)
- io: add passthrough
-
0.7.825 Apr 2023Release notes
Open source →This release bumps the MSRV of tokio-util to 1.56.
Added
- time: add
DelayQueue::peek(#5569)
Changed
This release contains one performance improvement:
- sync: try to lock the parent first in
CancellationToken(#5561)
Fixed
- time: fix panic in
DelayQueue(#5630)
Documented
- sync: improve
CancellationTokendoc on child tokens (#5632)
- time: add
-
0.7.712 Feb 2023Release notes
Open source →This release reverts the removal of the
Encoderbound on theFramedPartsconstructor from [#5280] since it turned out to be a breaking change. (#5450) -
0.7.610 Feb 2023Release notes
Open source →This release fixes a compilation failure in 0.7.5 when it is used together with Tokio version 1.21 and unstable features are enabled. (#5445)
-
0.7.509 Feb 2023Release notes
Open source →This release fixes an accidental breaking change where
UnwindSafewas accidentally removed fromCancellationToken.Added
- codec: add
Framed::backpressure_boundary(#5124) - io: add
InspectReaderandInspectWriter(#5033) - io: add
tokio_util::io::{CopyToBytes, SinkWriter}(#5070, #5436) - io: impl
std::io::BufReadonSyncIoBridge(#5265) - sync: add
PollSemaphore::poll_acquire_many(#5137) - sync: add owned future for
CancellationToken(#5153) - time: add
DelayQueue::try_remove(#5052)
Fixed
- codec: fix
LengthDelimitedCodecbuffer over-reservation (#4997) - sync: impl
UnwindSafeonCancellationToken(#5438) - util: remove
Encoderbound onFramedPartsconstructor (#5280)
Documented
- io: add lines example for
StreamReader(#5145)
- codec: add
-
0.7.408 Sep 2022 -
0.7.304 Jun 2022Release notes
Open source →Changed
- tracing: don't require default tracing features (#4592)
- util: simplify implementation of
ReusableBoxFuture(#4675)
Added (unstable)
-
0.7.215 May 2022Release notes
Open source →This release contains a rewrite of
CancellationTokenthat fixes a memory leak. (#4652) -
0.7.128 Mar 2022Release notes
Open source →Added
- codec: add
length_field_typetoLengthDelimitedCodecbuilder (#4508) - io: add
StreamReader::into_inner_with_chunk()(#4559)
Changed
- switch from log to tracing (#4539)
Fixed
- codec: add
-
0.7.010 Feb 2022Release notes
Open source →Added
- task: add
spawn_pinned(#3370) - time: add
shrink_to_fitandcompactmethods toDelayQueue(#4170) - codec: improve
Builder::max_frame_lengthdocs (#4352) - codec: add mutable reference getters for codecs to pinned
Framed(#4372) - net: add generic trait to combine
UnixListenerandTcpListener(#4385) - codec: implement
Framed::map_codec(#4427) - codec: implement
Encoder<BytesMut>forBytesCodec(#4465)
Changed
- task: add
-
0.6.1014 May 2022Release notes
Open source →This is a backport for the memory leak in
CancellationTokenthat was originally fixed in 0.7.2. (#4652) -
0.6.929 Oct 2021 -
0.6.803 Sep 2021 -
0.6.714 May 2021 -
0.6.612 Apr 2021Release notes
Open source →Added
- util: makes
FramedandFramedStreamresumable after eof (#3272) - util: add
PollSemaphore::{add_permits, available_permits}(#3683)
Fixed
- chore: avoid allocation if
PollSemaphoreis unused (#3634)
- util: makes
-
0.6.520 Mar 2021 -
0.6.409 Mar 2021 -
0.6.331 Jan 2021Release notes
Open source →Added
- sync: add
ReusableBoxFutureutility ([#3464])
Changed
- sync: use
ReusableBoxFutureforPollSemaphore([#3463]) - deps: remove
async-streamdependency ([#3463]) - deps: remove
tokio-streamdependency ([#3487])
- sync: add
-
0.6.221 Jan 2021Release notes
Open source →Added
- sync: add pollable
Semaphore([#3444])
Fixed
- time: fix panics on updating
DelayQueueentries ([#3270])
- sync: add pollable
-
0.6.112 Jan 2021Release notes
Open source →Added
- codec:
get_ref(),get_mut(),get_pin_mut()andinto_inner()forFramed,FramedRead,FramedWriteandStreamReader([#3364]). - codec:
write_buffer()andwrite_buffer_mut()forFramedandFramedWrite([#3387]).
- codec:
-
0.6.023 Dec 2020Release notes
Open source →Changed
- depend on
tokio1.0.
Added
- rt: add constructors to
TokioContext(#3221).
- depend on
-
0.5.103 Dec 2020Release notes
Open source →Added
- io:
poll_read_bufutil fn (#2972). - io:
poll_write_bufutil fn with vectored write support (#3156).
- io:
-
0.5.030 Oct 2020 -
0.4.015 Oct 2020Release notes
Open source →Added
- sync:
CancellationTokenfor coordinating task cancellation (#2747). - rt:
TokioContextsets the Tokio runtime for the duration of a future (#2791) - io:
StreamReader/ReaderStreammap betweenAsyncReadvalues andStreamof bytes (#2788). - time:
DelayQueueto manage many delays (#2897).
- sync:
-
0.3.119 Mar 2020Release notes
Open source →Fixed
- Adjust minimum-supported Tokio version to v0.2.5 to account for an internal dependency on features in that version of Tokio. ([#2326])
Release notes
Open source →This release fixes an use-after-free in the IO driver. Additionally, the
read_bufandwrite_bufmethods have been added back to the IO traits, as the bytes crate is now on track to reach version 1.0 together with Tokio.Fixed
Added
-
0.3.004 Mar 2020Release notes
Open source →Changed
- Breaking Change: Change
Encodertrait to take a genericItemparameter, which allows codec writers to pass references intoFramedandFramedWritetypes. ([#1746])
Added
- Add futures-io/tokio::io compatibility layer. ([#2117])
- Add
Framed::with_capacity. ([#2215])
Fixed
- Use advance over split_to when data is not needed. ([#2198])
Release notes
Open source →This represents a 1.0 beta release. APIs are polished and future-proofed. APIs not included for 1.0 stabilization have been removed.
Biggest changes are:
- I/O driver internal rewrite. The windows implementation includes significant changes.
- Runtime API is polished, especially with how it interacts with feature flag combinations.
- Feature flags are simplified
rt-coreandrt-utilare combined tortrt-threadedis renamed tort-multi-threadto match builder APItcp,udp,uds,dnsare combined tonet.parking_lotis included withfull
Changes
- meta: Minimum supported Rust version is now 1.45.
- io:
AsyncReadtrait now takesReadBufin order to safely handle reading into uninitialized memory (#2758). - io: Internal I/O driver storage is now able to compact (#2757).
- rt:
Runtime::block_onnow takes&self(#2782). - sync:
watchreworked to decouple receiving a change notification from receiving the value (#2814, #2806). - sync:
Notify::notifyis renamed tonotify_one(#2822). - process:
Child::killis now anasync fnthat cleans zombies (#2823). - sync: use
const fnconstructors as possible (#2833, #2790) - signal: reduce cross-thread notification (#2835).
- net: tcp,udp,uds types support operations with
&self(#2828, #2919, #2934). - sync: blocking
mpscchannel supportssendwith&self(#2861). - time: rename
delay_foranddelay_untiltosleepandsleep_until(#2826). - io: upgrade to
mio0.7 (#2893). - io:
AsyncSeektrait is tweaked (#2885). - fs:
Fileoperations take&self(#2930). - rt: runtime API, and
#[tokio::main]macro polish (#2876) - rt:
Runtime::enteruses an RAII guard instead of a closure (#2954). - net: the
from_stdfunction on all sockets no longer sets socket into non-blocking mode (#2893)
Added
- sync:
mapfunction to lock guards (#2445). - sync:
blocking_recvandblocking_sendfns tompscfor use outside of Tokio (#2685). - rt:
Builder::thread_name_fnfor configuring thread names (#1921). - fs: impl
FromRawFdandFromRawHandleforFile(#2792). - process:
Child::waitandChild::try_wait(#2796). - rt: support configuring thread keep-alive duration (#2809).
- rt:
task::JoinHandle::abortforcibly cancels a spawned task (#2474). - sync:
RwLockwrite guard to read guard downgrading (#2733). - net: add
poll_*functions that take&selfto all net types (#2845) - sync:
get_mut()forMutex,RwLock(#2856). - sync:
mpsc::Sender::closed()waits forReceiverhalf to close (#2840). - sync:
mpsc::Sender::is_closed()returns true ifReceiverhalf is closed (#2726). - stream:
iteranditer_muttoStreamMap(#2890). - net: implement
AsRawSocketon windows (#2911). - net:
TcpSocketcreates a socket without binding or listening (#2920).
Removed
- io: vectored ops are removed from
AsyncRead,AsyncWritetraits (#2882). - io:
miois removed from the public API.PollEventedandRegistrationare removed (#2893). - io: remove
bytesfrom public API.BufandBufMutimplementation are removed (#2908). - time:
DelayQueueis moved totokio-util(#2897).
Fixed
- io:
stdoutandstderrbuffering on windows (#2734).
- Breaking Change: Change
-
0.2.026 Nov 2019Release notes
Open source →A major breaking change. Most implementation and APIs have changed one way or another. This changelog entry contains a highlight
Changed
- APIs are updated to use
async / await. - most
tokio-*crates are collapsed into this crate. - Scheduler is rewritten.
tokio::spawnreturns aJoinHandle.- A single I/O / timer is used per runtime.
- I/O driver uses a concurrent slab for allocating state.
- components are made available via feature flag.
- Use
bytes0.5 tokio::codecis moved totokio-util.
Removed
- Standalone
timerandnetdrivers are removed, useRuntimeinstead current_threadruntime is removed, usetokio::runtime::Runtimewithbasic_schedulerinstead.
- APIs are updated to use
-
0.0.001 Feb 2018Nothing published for this version