PackageTrack
Sign in Get early access

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 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 38
  1. 0.7.19 21 Jul 2026
    Release notes

    chore: prepare tokio-util v0.7.19 (#8309)

    Open source →
    Release notes

    Added

    • io: add write_all_vectored (#7768, #8159)
    • sync: add DropGuard::token for cancellation tokens (#8226)
    • sync: implement PartialEq and Eq for CancellationToken (#8110)
    • task: add AbortOnDrop (#7855)
    • task: add JoinMap::try_join_next (#8099)

    Changed

    • codec: use libc::memchr for LinesCodec delimiter scan (#8141)

    Fixed

    • codec: fix is_readable when buffer is not empty (#7912)
    • task: avoid replacing the JoinQueue waker in try_join_next (#8279)
    • time: wake DelayQueue after resetting to expired (#8274)

    Documented

    • codec: document UdpFramed decoder errors (#8248)
    Open source →
  2. 0.7.18 04 Jan 2026
    Release notes

    Added

    • io: add tokio_util::io::simplex (#7565)

    Changed

    • task: remove unnecessary trait bounds on the Debug implementation for JoinQueue and AbortOnDropHandle (#7720)

    Fixed

    • deps: bump tokio to 1.44.0 (#7733)

    Documented

    • io: document the default capacity of the ReaderStream (#7147)
    • sync: fix a typo in the docs of PollSender::is_closed (#7737)
    Open source →
  3. 0.7.17 02 Nov 2025
    Release notes

    The MSRV is increased to 1.71.

    Added

    • codec: add {FramedRead,FramedWrite}::into_parts() (#7566)
    • time: add #[track_caller] to FutureExt::timeout (#7588)
    • task: add tokio_util::task::JoinQueue (#7590)

    Changed

    • codec: remove unnecessary trait bounds on all Framed constructors (#7716)

    Documented

    • time: clarify the cancellation safety of the DelayQueue (#7564)
    • docs: fix some docs links (#7654)
    • task: simplify the example of TaskTracker (#7657)
    • task: clarify the behavior of several spawn_local methods (#7669)
    Open source →
  4. 0.7.16 03 Aug 2025
    Release notes

    Added

    • codec: add FramedWrite::with_capacity (#7493)
    • future: add adapters of CancellationToken for FutureExt (#7475)
    • sync: add DropGuardRef for CancellationToken (#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_cancelled biased towards the token (#7462)
    • task: remove raw-entry feature from hashbrown dep (#7252)

    Documented

    • compat: add more documentation to tokio_util::compat (#7279)
    • sync: improve docs of tokio_util::sync::CancellationToken (#7408)
    Open source →
  5. 0.7.15 23 Apr 2025
    Release notes

    Fixed

    • task: properly handle removed entries in JoinMap (#7264)

    Updated

    • deps: update hashbrown to 0.15 (#7219)

    Documented

    • task: explicitly state that TaskTracker does not abort tasks on Drop (#7223)
    Open source →
  6. 0.7.14 13 Mar 2025
    Release notes

    Added

    • io: add get_ref and get_mut for SyncIoBridge (#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 Either to use underlying AsyncWrite implementation (#7025)

    Fixed

    • codec: fix typo in API docs (#7044)
    • util: fix example in StreamReader docs (#7167)

    Documented

    • io: add docs for SyncIoBridge with examples and alternatives (#6815)

    Internal

    • io: clean up buffer casts (#7142)
    • task: run spawn_pinned tests with miri (#7023)
    Open source →
  7. 0.7.13 04 Dec 2024
    Release notes

    Fixed

    • codec: fix incorrect handling of invalid utf-8 in LinesCodec::decode_eof (#7011)
    Open source →
  8. 0.7.12 04 Sep 2024
    Release notes

    This release bumps the MSRV to 1.70. (#6645)

    Added

    • sync: Add run_until_cancelled to tokio_util::sync::CancellationToken (#6618)
    • task: add AbortOnDropHandle type (#6786)

    Changed

    • deps: no default features for hashbrown (#6541)
    • time: wake DelayQueue when removing last item (#6752)
    • deps: enable the full feature when compiled for the playground (#6818)

    Documented

    • task: fix typo in TaskTracker docs (#6792)
    Open source →
  9. 0.7.11 04 May 2024
    Release notes

    This release updates the MSRV to 1.63. (#6126)

    Added

    • either: implement Sink for Either (#6239)
    • time: add DelayQueue::deadline (#6163)
    • time: add FutureExt::timeout (#6276)

    Changed

    • codec: assert compatibility between LengthDelimitedCodec options (#6414)
    • codec: make tracing feature optional for codecs (#6434)
    • io: add T: ?Sized to tokio_util::io::poll_read_buf (#6441)
    • sync: remove 'static bound on impl Sink for PollSender (#6397)

    Documented

    • codec: add examples for FramedRead and FramedWrite (#6310)
    • codec: document cancel safety of SinkExt::send and StreamExt::next (#6417)
    Open source →
  10. 0.7.10 25 Oct 2023
    Release notes

    Added

    • task: add TaskTracker (#6033)
    • task: add JoinMap::keys (#6046)
    • io: implement Seek for SyncIoBridge (#6058)

    Changed

    • deps: update hashbrown to 0.14 (#6102)
    Open source →
  11. 0.7.9 20 Sep 2023
    Release notes

    Added

    • io: add passthrough AsyncRead/AsyncWrite to InspectWriter/InspectReader (#5739)
    • task: add spawn blocking methods to JoinMap (#5797)
    • io: pass through traits for StreamReader and SinkWriter (#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)
    Open source →
  12. 0.7.8 25 Apr 2023
    Release notes

    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 CancellationToken doc on child tokens (#5632)
    Open source →
  13. 0.7.7 12 Feb 2023
    Release notes

    This release reverts the removal of the Encoder bound on the FramedParts constructor from [#5280] since it turned out to be a breaking change. (#5450)

    Open source →
  14. 0.7.6 10 Feb 2023
    Release notes

    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)

    Open source →
  15. 0.7.5 09 Feb 2023
    Release notes

    This release fixes an accidental breaking change where UnwindSafe was accidentally removed from CancellationToken.

    Added

    • codec: add Framed::backpressure_boundary (#5124)
    • io: add InspectReader and InspectWriter (#5033)
    • io: add tokio_util::io::{CopyToBytes, SinkWriter} (#5070, #5436)
    • io: impl std::io::BufRead on SyncIoBridge (#5265)
    • sync: add PollSemaphore::poll_acquire_many (#5137)
    • sync: add owned future for CancellationToken (#5153)
    • time: add DelayQueue::try_remove (#5052)

    Fixed

    • codec: fix LengthDelimitedCodec buffer over-reservation (#4997)
    • sync: impl UnwindSafe on CancellationToken (#5438)
    • util: remove Encoder bound on FramedParts constructor (#5280)

    Documented

    • io: add lines example for StreamReader (#5145)
    Open source →
  16. 0.7.4 08 Sep 2022
    Release notes

    Added

    • io: add SyncIoBridge::shutdown() (#4938)
    • task: improve LocalPoolHandle (#4680)

    Fixed

    • util: add track_caller to public APIs (#4785)

    Unstable

    • task: fix compilation errors in JoinMap with Tokio v1.21.0 (#4755)
    • task: remove the unstable, deprecated JoinMap::join_one (#4920)
    Open source →
  17. 0.7.3 04 Jun 2022
    Release notes

    Changed

    • tracing: don't require default tracing features (#4592)
    • util: simplify implementation of ReusableBoxFuture (#4675)

    Added (unstable)

    Open source →
  18. 0.7.2 15 May 2022
    Release notes

    This release contains a rewrite of CancellationToken that fixes a memory leak. (#4652)

    Open source →
  19. 0.7.1 28 Mar 2022
    Release notes

    Added

    • codec: add length_field_type to LengthDelimitedCodec builder (#4508)
    • io: add StreamReader::into_inner_with_chunk() (#4559)

    Changed

    • switch from log to tracing (#4539)

    Fixed

    • sync: fix waker update condition in CancellationToken (#4497)
    • bumped tokio dependency to 1.6 to satisfy minimum requirements (#4490)
    Open source →
  20. 0.7.0 10 Feb 2022
    Release notes

    Added

    • task: add spawn_pinned (#3370)
    • time: add shrink_to_fit and compact methods to DelayQueue (#4170)
    • codec: improve Builder::max_frame_length docs (#4352)
    • codec: add mutable reference getters for codecs to pinned Framed (#4372)
    • net: add generic trait to combine UnixListener and TcpListener (#4385)
    • codec: implement Framed::map_codec (#4427)
    • codec: implement Encoder<BytesMut> for BytesCodec (#4465)

    Changed

    • sync: add lifetime parameter to ReusableBoxFuture (#3762)
    • sync: refactored PollSender<T> to fix a subtly broken Sink<T> implementation (#4214)
    • time: remove error case from the infallible DelayQueue::poll_elapsed (#4241)
    Open source →
  21. 0.6.10 14 May 2022
    Release notes

    This is a backport for the memory leak in CancellationToken that was originally fixed in 0.7.2. (#4652)

    Open source →
  22. 0.6.9 29 Oct 2021
    Release notes

    Added

    • codec: implement Clone for LengthDelimitedCodec (#4089)
    • io: add SyncIoBridge (#4146)

    Fixed

    • time: update deadline on removal in DelayQueue (#4178)
    • codec: Update stream impl for Framed to return None after Err (#4166)
    Open source →
  23. 0.6.8 03 Sep 2021
    Release notes

    Added

    • sync: add drop guard for CancellationToken (#3839)
    • compact: added AsyncSeek compat (#4078)
    • time: expose Key used in DelayQueue's Expired (#4081)
    • io: add with_capacity to ReaderStream (#4086)

    Fixed

    • codec: remove unnecessary doc(cfg(...)) (#3989)
    Open source →
  24. 0.6.7 14 May 2021
    Release notes

    Added

    • udp: make UdpFramed take Borrow<UdpSocket> (#3451)
    • compat: implement AsRawFd/AsRawHandle for Compat<T> (#3765)
    Open source →
  25. 0.6.6 12 Apr 2021
    Release notes

    Added

    • util: makes Framed and FramedStream resumable after eof (#3272)
    • util: add PollSemaphore::{add_permits, available_permits} (#3683)

    Fixed

    • chore: avoid allocation if PollSemaphore is unused (#3634)
    Open source →
  26. 0.6.5 20 Mar 2021
    Release notes

    Fixed

    • util: annotate time module as requiring time feature (#3606)
    Open source →
  27. 0.6.4 09 Mar 2021
    Release notes

    Added

    • codec: AnyDelimiter codec (#3406)
    • sync: add pollable mpsc::Sender (#3490)

    Fixed

    • codec: LinesCodec should only return MaxLineLengthExceeded once per line (#3556)
    • sync: fuse PollSemaphore (#3578)
    Open source →
  28. 0.6.3 31 Jan 2021
    Release notes

    Added

    • sync: add ReusableBoxFuture utility ([#3464])

    Changed

    • sync: use ReusableBoxFuture for PollSemaphore ([#3463])
    • deps: remove async-stream dependency ([#3463])
    • deps: remove tokio-stream dependency ([#3487])
    Open source →
  29. 0.6.2 21 Jan 2021
    Release notes

    Added

    • sync: add pollable Semaphore ([#3444])

    Fixed

    • time: fix panics on updating DelayQueue entries ([#3270])
    Open source →
  30. 0.6.1 12 Jan 2021
    Release notes

    Added

    • codec: get_ref(), get_mut(), get_pin_mut() and into_inner() for Framed, FramedRead, FramedWrite and StreamReader ([#3364]).
    • codec: write_buffer() and write_buffer_mut() for Framed and FramedWrite ([#3387]).
    Open source →
  31. 0.6.0 23 Dec 2020
    Release notes

    Changed

    • depend on tokio 1.0.

    Added

    • rt: add constructors to TokioContext (#3221).
    Open source →
  32. 0.5.1 03 Dec 2020
    Release notes

    Added

    • io: poll_read_buf util fn (#2972).
    • io: poll_write_buf util fn with vectored write support (#3156).
    Open source →
  33. 0.5.0 30 Oct 2020
    Release notes

    Changed

    • io: update bytes to 0.6 (#3071).
    Open source →
  34. 0.4.0 15 Oct 2020
    Release notes

    Added

    • sync: CancellationToken for coordinating task cancellation (#2747).
    • rt: TokioContext sets the Tokio runtime for the duration of a future (#2791)
    • io: StreamReader/ReaderStream map between AsyncRead values and Stream of bytes (#2788).
    • time: DelayQueue to manage many delays (#2897).
    Open source →
  35. 0.3.1 19 Mar 2020
    Release notes

    Fixed

    • Adjust minimum-supported Tokio version to v0.2.5 to account for an internal dependency on features in that version of Tokio. ([#2326])
    Open source →
    Release notes

    This release fixes an use-after-free in the IO driver. Additionally, the read_buf and write_buf methods 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

    • net: fix use-after-free (#3019).
    • fs: ensure buffered data is written on shutdown (#3009).

    Added

    • io: copy_buf() (#2884).
    • io: AsyncReadExt::read_buf(), AsyncReadExt::write_buf() for working with Buf/BufMut (#3003).
    • rt: Runtime::spawn_blocking() (#2980).
    • sync: watch::Sender::is_closed() (#2991).
    Open source →
  36. 0.3.0 04 Mar 2020
    Release notes

    Changed

    • Breaking Change: Change Encoder trait to take a generic Item parameter, which allows codec writers to pass references into Framed and FramedWrite types. ([#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])
    Open source →
    Release notes

    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-core and rt-util are combined to rt
      • rt-threaded is renamed to rt-multi-thread to match builder API
      • tcp, udp, uds, dns are combined to net.
      • parking_lot is included with full

    Changes

    • meta: Minimum supported Rust version is now 1.45.
    • io: AsyncRead trait now takes ReadBuf in order to safely handle reading into uninitialized memory (#2758).
    • io: Internal I/O driver storage is now able to compact (#2757).
    • rt: Runtime::block_on now takes &self (#2782).
    • sync: watch reworked to decouple receiving a change notification from receiving the value (#2814, #2806).
    • sync: Notify::notify is renamed to notify_one (#2822).
    • process: Child::kill is now an async fn that cleans zombies (#2823).
    • sync: use const fn constructors as possible (#2833, #2790)
    • signal: reduce cross-thread notification (#2835).
    • net: tcp,udp,uds types support operations with &self (#2828, #2919, #2934).
    • sync: blocking mpsc channel supports send with &self (#2861).
    • time: rename delay_for and delay_until to sleep and sleep_until (#2826).
    • io: upgrade to mio 0.7 (#2893).
    • io: AsyncSeek trait is tweaked (#2885).
    • fs: File operations take &self (#2930).
    • rt: runtime API, and #[tokio::main] macro polish (#2876)
    • rt: Runtime::enter uses an RAII guard instead of a closure (#2954).
    • net: the from_std function on all sockets no longer sets socket into non-blocking mode (#2893)

    Added

    • sync: map function to lock guards (#2445).
    • sync: blocking_recv and blocking_send fns to mpsc for use outside of Tokio (#2685).
    • rt: Builder::thread_name_fn for configuring thread names (#1921).
    • fs: impl FromRawFd and FromRawHandle for File (#2792).
    • process: Child::wait and Child::try_wait (#2796).
    • rt: support configuring thread keep-alive duration (#2809).
    • rt: task::JoinHandle::abort forcibly cancels a spawned task (#2474).
    • sync: RwLock write guard to read guard downgrading (#2733).
    • net: add poll_* functions that take &self to all net types (#2845)
    • sync: get_mut() for Mutex, RwLock (#2856).
    • sync: mpsc::Sender::closed() waits for Receiver half to close (#2840).
    • sync: mpsc::Sender::is_closed() returns true if Receiver half is closed (#2726).
    • stream: iter and iter_mut to StreamMap (#2890).
    • net: implement AsRawSocket on windows (#2911).
    • net: TcpSocket creates a socket without binding or listening (#2920).

    Removed

    • io: vectored ops are removed from AsyncRead, AsyncWrite traits (#2882).
    • io: mio is removed from the public API. PollEvented and Registration are removed (#2893).
    • io: remove bytes from public API. Buf and BufMut implementation are removed (#2908).
    • time: DelayQueue is moved to tokio-util (#2897).

    Fixed

    • io: stdout and stderr buffering on windows (#2734).
    Open source →
  37. 0.2.0 26 Nov 2019
    Release notes
    • Initial release
    Open source →
    Release notes

    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::spawn returns a JoinHandle.
    • 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 bytes 0.5
    • tokio::codec is moved to tokio-util.

    Removed

    • Standalone timer and net drivers are removed, use Runtime instead
    • current_thread runtime is removed, use tokio::runtime::Runtime with basic_scheduler instead.
    Open source →
  38. 0.0.0 01 Feb 2018

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive