NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #2640 most downloaded on crates.io
High performance, strict, tokio-util based WebSockets implementation
Last release 3 months ago
25 Jun 2026
Ships fairly regularly
a new release about every 2 months
Most releases are documented
notes for 25 of 31 stable releases
1 version withdrawn
withdrawn after publishing
4 years old
32 releases · first in 2022
One column per quarter.
rustls-platform-verifier was upgraded to 0.7
On loongarch64, frame (un)masking can now also make use of LSX alongside the existing LASX support
nightly feature enabled now works on s390x with the latest Rust nightlies againThe new WebSocketStream::into_inner method discards the WebSocket stream and provides you with the raw underlying I/O
WebSocketStream::into_inner method discards the WebSocket stream and provides you with the raw underlying I/OServerBuilder::add_headernightly feature enabled on s390x now works with the latest nightlies againWith the nightly feature enabled and no random number generator enabled, std::random will now be used
nightly feature enabled and no random number generator enabled, std::random will now be usedrustls crypto provider is now installed implicitly, which in turn results in TlsConnector::now now panicking instead of returning the now-removed NoCryptoProviderConfigured error variantnightly featureThe docs build should be fixed by this release
The minimum version requirement for fastrand was corrected to 2.2.0 to match reality
fastrand was corrected to 2.2.0 to match realityFixed an out-of-bounds access when sending a large number of messages at once
With the nightly feature enabled, SIMD-accelerated masking is now supported on s390x and loongarch64
nightly feature enabled, SIMD-accelerated masking is now supported on s390x and loongarch64webpki-roots was upgraded to 1.xrustls-platform-verifier was upgraded to 0.6SinkExt::feedrustls-related features now require configuring a global crypto provider for rustlssimd feature flag was removed - it had no effect since 0.11.1, SIMD support is now detected at runtimeFixed an issue where poll_next would not attempt to flush to stream when there is data to be sent. This is achieved by storing and then reusing the wr
poll_next would not attempt to flush to stream when there is data to be sent. This is achieved by storing and then reusing the writer task's waker in poll_next.In cases where the underlying I/O was failed but data remained to be sent, a call to poll_close the WebSocket stream would block indefinitely, this is
poll_close the WebSocket stream would block indefinitely, this is now properly handled by returning None from poll_next after I/O errorsReduced the amount of unsafe code
rand was updated to 0.9Host header no longer unconditionally includes a port anymore, which is more in line with the RFC and fixes interacting with some webserversThe SIMD algorithms have been improved and support for them is now detected at runtime. The simd feature flag is deprecated
simd feature flag is deprecatedgetrandom was updated to 0.3poll_flush call by a writer would stall infinitely if poll_next was called at the same time (see #92)The SIMD masking code now supports AltiVec on PowerPC targets (nightly only)
WebSocketStream::{get_ref, get_mut} allow access to the underlying I/Oclient::DISALLOWED_HEADERS is a list of headers that may not be added via ClientBuilder::add_headerCloseCode::is_reserved returns whether the close code is reserved (i.e. may not be sent over the wire)ServerBuilder::accept now returns the client's HTTP request alongside the websocket stream in a tupleClientBuilder::add_header now returns a Result and errors when adding a disallowed headerMessage::close will now panic when the close code is reserved or the reason exceeds 123 bytesMessage::{ping, pong} will now panic when the payload exceeds 125 bytesrustls-platform-verifier was updated to 0.5nightly featureThe new rustls-bring-your-own-connector feature allows for creating a Connector::Rustls instance without pulling in any other certificate roots
rustls-bring-your-own-connector feature allows for creating a Connector::Rustls instance without pulling in any other certificate rootsConfig::flush_thresholdConfig::frame_size now panics when the frame size is set to 0BytesMut::reserve internals, improving throughput by up to 30%poll_ready, but rather tracked as messages are queuedError::NoNativeRootCertificatesFound was added and is returned in TlsConnector::new if no native root certificates were found and the rustls-webpki-ro
Error::NoNativeRootCertificatesFound was added and is returned in TlsConnector::new if no native root certificates were found and the rustls-webpki-roots feature is not enabledTlsConnector::new is now always availableError::NoTlsConnectorConfigured was removed and replaced by Error::NoCryptoProviderConfiguredrustls-native-certs was updated to 0.8Payload now also implements Into , which is a cheap conversion unless multiple references to the backing buffer exist
Payload now implements From<Vec<u8>>Payload now also implements Into<BytesMut>, which is a cheap conversion unless multiple references to the backing buffer existsplit_at_mut_unchecked to make some unsafe code less error proneResolver trait now uses async fn syntaxFrom<String> implementation on Payload now uses BytesMut internally, improving performance in some casesFrom<Bytes> implementation on Payload now uses BytesMut internally if cheaply possible, improving performance in some casesFixed an unsafe precondition violation triggered upon receiving close messages with empty reason
### Fixed - Yet another docs.rs build fix
Added support for rustls-platform-verifier via a feature with the same name
rustls-platform-verifier via a feature with the same nameSupport for aws_lc_rs as a SHA1 and crypto provider was added via the aws_lc_rs feature, optionally also FIPS-compliant via the fips feature
aws_lc_rs as a SHA1 and crypto provider was added via the aws_lc_rs feature, optionally also FIPS-compliant via the fips featurerustls-tls12 feature will enable TLS1.2 support in rustlsEncoder implementations and the associated write buffers were removedclient feature no longer depends on tokio/rtnightly feature now enables the stdarch_x86_avx512 nightly feature only on x86_64 instead of all architecturesConfig::frame_size was ambiguous about whether it affected the payload size or the entire frame size, this has been clarified to be the payload sizehttp-integration feature and associated upgrade_request method were removed, it offered little to no value over manually crafting a request and bloated the dev-dependency stack unnecessarily[breaking] The future returned from Resolver::resolve is now required to be Send. This restores backwards compatibility with 0.5.x
Resolver::resolve is now required to be Send. This restores backwards compatibility with 0.5.xPayload now implements From<&'static [u8]> and From<&'static str>
Payload now implements From<&'static [u8]> and From<&'static str>ClientBuilder now allows specifying a DNS resolver that implements the Resolver trait via ClientBuilder::resolver, stored as a generic on the builder. It defaults to resolver::Gai, which matches behavior on previous versionsClientBuilder::connect now returns an Error::UnsupportedScheme if the URI does not set the scheme to ws or wssClientBuilder::connect will no longer unconditionally use the specified custom connector, instead it will always use a plain connector for the ws schemenightly feature now uses the new stdsimd feature instead of stdarch_x86_avx512, which was removed in recent nightly compiler versionsDebug implementation of Connector now prints the correct name of the Rustls variantMessage::text with invalid UTF-8 and then converted to a &str via Message::as_text. This will now cause a panicMessage::text now takes Into instead of String, which now implements Into
Message::text now takes Into<Payload> instead of String, which now implements Into<Payload>Updated http to 1.0 and rustls-related dependencies to those compatible with rustls 0.22
http to 1.0 and rustls-related dependencies to those compatible with rustls 0.22ring is now an optional dependency with rustls and different crypto providers can be usedsimdutf8 feature flags for aarch64upgrade_request no longer uses an explicit body type, now it only requires the body to implement DefaultWebsocketStream has been renamed to WebSocketStreamMessage payloads are now exposed as Payload and it is possible to create messages from Bytes-backed payloadsFixed invalid opcode errors when intermediate control frames were received
Update webpki to 0.24, webpki-roots to 0.25 and rust-webpki to 0.101
webpki to 0.24, webpki-roots to 0.25 and rust-webpki to 0.101nightly feature flag and requires a nightly compiler{ClientBuilder, ServerBuilder}::limits to protect against malicious peers{ClientBuilder, ServerBuilder}::config. This currently only supports changing the frame payload size that outgoing messages are chunked intoDebugfastrandupgrade::Error is now publicly accessible and can thus be matched onClientBuilder methods which perform a handshake now return a tuple of (WebsocketStream, Response) to retrieve e.g. response headersWebsocketStream is now fully cancellation safe and implements Stream, therefore using WebsocketStream::next now requires having StreamExt in scopeCloseCode is now a wrapper around a NonZeroU16 instead of an enum. Enum variants have been moved to associated constants. This fixes possible creation of disallowed close codes by the usernon_exhaustive to prevent consumer build breakage when new variants are added{ClientBuilder, ServerBuilder}::fail_fast_on_invalid_utf8 has been removed and is now always enabled because our implementation for streaming UTF-8 validation is already efficient enough, benchmarks show no gains anymoreInvalidOpcode). ConnectionClosed has been entirely removed in favor of returning None from poll_next because it is more idiomaticWebsocketStream::close has been removed. The SinkExt::close implementation will send a default close message and properly shut down the sink. Custom close messages can be sent via SinkExt::send followed by SinkExt::closefutures-util dependency has been removedNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →