since rc.1
- breaking:
axum::extract::ws::Message
now usesBytes
in place ofVec<u8>
,
and a newUtf8Bytes
type in place ofString
, for its variants (#3078) - breaking: Remove
OptionalFromRequestParts
impl forQuery
(#3088) - changed: Upgraded
tokio-tungstenite
to 0.26 (#3078) - changed: Query/Form: Use
serde_path_to_error
to report fields that failed to parse (#3081)
full changelog
Note: there are further relevant changes in axum-core's changelog
- breaking: Upgrade matchit to 0.8, changing the path parameter syntax from
/:single
and/*many
to/{single}
and/{*many}
; the old syntax produces a panic to avoid silent change in behavior (#2645) - breaking: Require
Sync
for all handlers and services added toRouter
andMethodRouter
(#2473) - breaking: The tuple and tuple_struct
Path
extractor deserializers now check that the number of parameters matches the tuple length exactly (#2931) - breaking: Move
Host
extractor toaxum-extra
(#2956) - breaking: Remove
WebSocket::close
. Users should explicitly send close messages themselves. (#2974) - breaking: Make
serve
generic over the listener and IO types (#2941) - breaking: Remove
Serve::tcp_nodelay
andWithGracefulShutdown::tcp_nodelay
.
Seeserve::ListenerExt
for an API that let you set arbitrary TCP stream properties. (#2941) - breaking:
Option<Path<T>>
no longer swallows all error conditions,
instead rejecting the request in many cases; see its documentation for details (#2475) - breaking:
axum::extract::ws::Message
now usesBytes
in place ofVec<u8>
,
and a newUtf8Bytes
type in place ofString
, for its variants (#3078) - fixed: Skip SSE incompatible chars of
serde_json::RawValue
inEvent::json_data
(#2992) - fixed: Don't panic when array type is used for path segment (#3039)
- fixed: Avoid setting
content-length
before middleware.
This allows middleware to add bodies to requests without needing to manually setcontent-length
(#2897) - change: Update minimum rust version to 1.75 (#2943)
- changed: Upgraded
tokio-tungstenite
to 0.26 (#3078) - changed: Query/Form: Use
serde_path_to_error
to report fields that failed to parse (#3081) - added: Add
method_not_allowed_fallback
to set a fallback when a path matches but there is no handler for the given HTTP method (#2903) - added: Add
NoContent
as a self-described shortcut forStatusCode::NO_CONTENT
(#2978) - added: Add support for WebSockets over HTTP/2. They can be enabled by changing
get(ws_endpoint)
handlers toany(ws_endpoint)
(#2894) - added: Add
MethodFilter::CONNECT
,routing::connect[_service]
andMethodRouter::connect[_service]
(#2961) - added: Extend
FailedToDeserializePathParams::kind
enum with (ErrorKind::DeserializeError
). This new variant captures bothkey
,value
, andmessage
from named path parameters parse errors, instead of only deserialization error message inErrorKind::Message
. (#2720)