cargo / tokio
tokio
What changed in tokio 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-12.
9 breaking2 security4 deprecations15 new APIs and options1 performance4 behavior and defaults27 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inittokio 162 changes
Breaking changes 9
Panics when created with zero capacity.
Panics when created with zero capacity.
Rejects a zero buffer size.
Rejects zero as a maximum buffer size.
Panics when created with zero capacity.
Panics when set to zero.
The minimum supported Rust version is increased to 1.85.
Adds AsyncFd::register.
Adds AsyncFd::register_with_interest.
Security 2
Tokio: Race condition in
tokio::time::IntervalAsyncFd::newand related constructors violate I/O safety
Deprecations 4
Deprecates AsyncFd::new.
Deprecates AsyncFd::try_new.
Deprecates AsyncFd::try_with_interest.
Deprecates AsyncFd::with_interest.
New APIs and options 15
Adds a runtime builder method for configuring the maximum I/O events per busy tick.
Adds a method to set a file's modified time.
Adds a method to set file timestamps.
Adds the FileTimes type for working with file timestamps.
Adds JSPI support for the Emscripten target.
Implements Default for named-pipe client options.
Implements Default for named-pipe server options.
Exposes schedule latency in task hooks as an unstable feature.
Adds blocking_acquire methods to Semaphore.
Adds a method to retrieve the semaphore associated with a permit.
Adds an opt-in sharded spawn_blocking queue as an unstable feature.
Supports vectored writes.
Adds UCred support on Fuchsia.
Adds support for the wasm32-unknown-emscripten target.
Adds a method to check whether a watch receiver is closed.
Performance 1
Avoids the atomic reader count in broadcast slots.
Behavior and default changes 4
Makes copy_buf cooperative.
Makes enable_io available whenever the rt feature is enabled.
Uses usize for the permit count.
Stabilizes the runtime worker_index function.
Fixes and other changes 27
Reverts the removal of the runtime handle from timers.
Accepted sockets start as readable and writable.
Clarifies the channel's panic behavior.
Waits for pending operations before seeking.
Flushes the writer when the reader stalls.
More I/O operations now retry on ErrorKind::Interrupted.
Restores File internal state when an operation fails.
Falls back when io_uring has no I/O driver.
Reads lines as bytes so a partial line survives an I/O error.
The panic message for nested block_on now suggests using .await.
Uses acquire/release orderings.
Keeps the shutdown bit when clearing readiness.
Preserves the full ScheduledIo tick in readiness events.
Avoids overflow in shutdown_timeout.
Fixes a hang when only scheduler workers exist.
Saturates the listen backlog value.
Sockets returned by pair start as writable.
Saturates the listen backlog value.
Sockets returned by pair start as writable.
Treats ENOTCONN as success.
Completes zero-length memory stream operations immediately.
Wakes and drops DuplexStream wakers outside the lock.
Keeps the io_uring operation alive when submission fails after push.
Avoids unreachable_code for Infallible in join!.
Fixes paused time auto-advancing when I/O wakes a task on current_thread.
Wakes waiters outside the lock when closing a semaphore.
Avoids unreachable_code for Infallible in try_join!.