From abe98474e1a1cc520091f70c62079968b8a3a022 Mon Sep 17 00:00:00 2001 From: Nano Date: Thu, 1 May 2025 13:54:29 +0500 Subject: [PATCH 01/30] Make SSE less dependent on tokio (#3154) --- axum/src/response/mod.rs | 2 - axum/src/response/sse.rs | 207 ++++++++++++++++++++++++++------------- 2 files changed, 137 insertions(+), 72 deletions(-) diff --git a/axum/src/response/mod.rs b/axum/src/response/mod.rs index dd616dff..70be7452 100644 --- a/axum/src/response/mod.rs +++ b/axum/src/response/mod.rs @@ -4,7 +4,6 @@ use http::{header, HeaderValue, StatusCode}; mod redirect; -#[cfg(feature = "tokio")] pub mod sse; #[doc(no_inline)] @@ -27,7 +26,6 @@ pub use axum_core::response::{ pub use self::redirect::Redirect; #[doc(inline)] -#[cfg(feature = "tokio")] pub use sse::Sse; /// An HTML response. diff --git a/axum/src/response/sse.rs b/axum/src/response/sse.rs index 54ec2b46..12cb65bf 100644 --- a/axum/src/response/sse.rs +++ b/axum/src/response/sse.rs @@ -38,21 +38,18 @@ use futures_util::stream::{Stream, TryStream}; use http_body::Frame; use pin_project_lite::pin_project; use std::{ - fmt, - future::Future, + fmt, mem, pin::Pin, task::{ready, Context, Poll}, time::Duration, }; use sync_wrapper::SyncWrapper; -use tokio::time::Sleep; /// An SSE response #[derive(Clone)] #[must_use] pub struct Sse { stream: S, - keep_alive: Option, } impl Sse { @@ -65,18 +62,17 @@ impl Sse { S: TryStream + Send + 'static, S::Error: Into, { - Sse { - stream, - keep_alive: None, - } + Sse { stream } } /// Configure the interval between keep-alive messages. /// /// Defaults to no keep-alive messages. - pub fn keep_alive(mut self, keep_alive: KeepAlive) -> Self { - self.keep_alive = Some(keep_alive); - self + #[cfg(feature = "tokio")] + pub fn keep_alive(self, keep_alive: KeepAlive) -> Sse> { + Sse { + stream: KeepAliveStream::new(keep_alive, self.stream), + } } } @@ -84,7 +80,6 @@ impl fmt::Debug for Sse { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Sse") .field("stream", &format_args!("{}", std::any::type_name::())) - .field("keep_alive", &self.keep_alive) .finish() } } @@ -102,7 +97,6 @@ where ], Body::new(SseBody { event_stream: SyncWrapper::new(self.stream), - keep_alive: self.keep_alive.map(KeepAliveStream::new), }), ) .into_response() @@ -113,8 +107,6 @@ pin_project! { struct SseBody { #[pin] event_stream: SyncWrapper, - #[pin] - keep_alive: Option, } } @@ -131,35 +123,67 @@ where ) -> Poll, Self::Error>>> { let this = self.project(); - match this.event_stream.get_pin_mut().poll_next(cx) { - Poll::Pending => { - if let Some(keep_alive) = this.keep_alive.as_pin_mut() { - keep_alive.poll_event(cx).map(|e| Some(Ok(Frame::data(e)))) - } else { - Poll::Pending + match ready!(this.event_stream.get_pin_mut().poll_next(cx)) { + Some(Ok(event)) => Poll::Ready(Some(Ok(Frame::data(event.finalize())))), + Some(Err(error)) => Poll::Ready(Some(Err(error))), + None => Poll::Ready(None), + } + } +} + +/// The state of an event's buffer. +/// +/// This type allows creating events in a `const` context +/// by using a finalized buffer. +/// +/// While the buffer is active, more bytes can be written to it. +/// Once finalized, it's immutable and cheap to clone. +/// The buffer is active during the event building, but eventually +/// becomes finalized to send http body frames as [`Bytes`]. +#[derive(Debug, Clone)] +enum Buffer { + Active(BytesMut), + Finalized(Bytes), +} + +impl Buffer { + /// Returns a mutable reference to the internal buffer. + /// + /// If the buffer was finalized, this method creates + /// a new active buffer with the previous contents. + fn as_mut(&mut self) -> &mut BytesMut { + match self { + Buffer::Active(bytes_mut) => bytes_mut, + Buffer::Finalized(bytes) => { + *self = Buffer::Active(BytesMut::from(mem::take(bytes))); + match self { + Buffer::Active(bytes_mut) => bytes_mut, + Buffer::Finalized(_) => unreachable!(), } } - Poll::Ready(Some(Ok(event))) => { - if let Some(keep_alive) = this.keep_alive.as_pin_mut() { - keep_alive.reset(); - } - Poll::Ready(Some(Ok(Frame::data(event.finalize())))) - } - Poll::Ready(Some(Err(error))) => Poll::Ready(Some(Err(error))), - Poll::Ready(None) => Poll::Ready(None), } } } /// Server-sent event -#[derive(Debug, Default, Clone)] +#[derive(Debug, Clone)] #[must_use] pub struct Event { - buffer: BytesMut, + buffer: Buffer, flags: EventFlags, } impl Event { + /// Default keep-alive event + pub const DEFAULT_KEEP_ALIVE: Self = Self::finalized(Bytes::from_static(b":\n\n")); + + const fn finalized(bytes: Bytes) -> Self { + Self { + buffer: Buffer::Finalized(bytes), + flags: EventFlags::from_bits(0), + } + } + /// Set the event's data data field(s) (`data: `) /// /// Newlines in `data` will automatically be broken across `data: ` fields. @@ -179,7 +203,7 @@ impl Event { T: AsRef, { if self.flags.contains(EventFlags::HAS_DATA) { - panic!("Called `EventBuilder::data` multiple times"); + panic!("Called `Event::data` multiple times"); } for line in memchr_split(b'\n', data.as_ref().as_bytes()) { @@ -222,13 +246,14 @@ impl Event { } } if self.flags.contains(EventFlags::HAS_DATA) { - panic!("Called `EventBuilder::json_data` multiple times"); + panic!("Called `Event::json_data` multiple times"); } - self.buffer.extend_from_slice(b"data: "); - serde_json::to_writer(IgnoreNewLines((&mut self.buffer).writer()), &data) + let buffer = self.buffer.as_mut(); + buffer.extend_from_slice(b"data: "); + serde_json::to_writer(IgnoreNewLines(buffer.writer()), &data) .map_err(axum_core::Error::new)?; - self.buffer.put_u8(b'\n'); + buffer.put_u8(b'\n'); self.flags.insert(EventFlags::HAS_DATA); @@ -272,7 +297,7 @@ impl Event { T: AsRef, { if self.flags.contains(EventFlags::HAS_EVENT) { - panic!("Called `EventBuilder::event` multiple times"); + panic!("Called `Event::event` multiple times"); } self.flags.insert(EventFlags::HAS_EVENT); @@ -292,33 +317,32 @@ impl Event { /// Panics if this function has already been called on this event. pub fn retry(mut self, duration: Duration) -> Event { if self.flags.contains(EventFlags::HAS_RETRY) { - panic!("Called `EventBuilder::retry` multiple times"); + panic!("Called `Event::retry` multiple times"); } self.flags.insert(EventFlags::HAS_RETRY); - self.buffer.extend_from_slice(b"retry:"); + let buffer = self.buffer.as_mut(); + buffer.extend_from_slice(b"retry:"); let secs = duration.as_secs(); let millis = duration.subsec_millis(); if secs > 0 { // format seconds - self.buffer - .extend_from_slice(itoa::Buffer::new().format(secs).as_bytes()); + buffer.extend_from_slice(itoa::Buffer::new().format(secs).as_bytes()); // pad milliseconds if millis < 10 { - self.buffer.extend_from_slice(b"00"); + buffer.extend_from_slice(b"00"); } else if millis < 100 { - self.buffer.extend_from_slice(b"0"); + buffer.extend_from_slice(b"0"); } } // format milliseconds - self.buffer - .extend_from_slice(itoa::Buffer::new().format(millis).as_bytes()); + buffer.extend_from_slice(itoa::Buffer::new().format(millis).as_bytes()); - self.buffer.put_u8(b'\n'); + buffer.put_u8(b'\n'); self } @@ -340,7 +364,7 @@ impl Event { T: AsRef, { if self.flags.contains(EventFlags::HAS_ID) { - panic!("Called `EventBuilder::id` multiple times"); + panic!("Called `Event::id` multiple times"); } self.flags.insert(EventFlags::HAS_ID); @@ -362,20 +386,36 @@ impl Event { None, "SSE field value cannot contain newlines or carriage returns", ); - self.buffer.extend_from_slice(name.as_bytes()); - self.buffer.put_u8(b':'); - self.buffer.put_u8(b' '); - self.buffer.extend_from_slice(value); - self.buffer.put_u8(b'\n'); + + let buffer = self.buffer.as_mut(); + buffer.extend_from_slice(name.as_bytes()); + buffer.put_u8(b':'); + buffer.put_u8(b' '); + buffer.extend_from_slice(value); + buffer.put_u8(b'\n'); } - fn finalize(mut self) -> Bytes { - self.buffer.put_u8(b'\n'); - self.buffer.freeze() + fn finalize(self) -> Bytes { + match self.buffer { + Buffer::Finalized(bytes) => bytes, + Buffer::Active(mut bytes_mut) => { + bytes_mut.put_u8(b'\n'); + bytes_mut.freeze() + } + } } } -#[derive(Default, Debug, Copy, Clone, PartialEq)] +impl Default for Event { + fn default() -> Self { + Self { + buffer: Buffer::Active(BytesMut::new()), + flags: EventFlags::from_bits(0), + } + } +} + +#[derive(Debug, Copy, Clone, PartialEq)] struct EventFlags(u8); impl EventFlags { @@ -406,7 +446,7 @@ impl EventFlags { #[derive(Debug, Clone)] #[must_use] pub struct KeepAlive { - event: Bytes, + event: Event, max_interval: Duration, } @@ -414,7 +454,7 @@ impl KeepAlive { /// Create a new `KeepAlive`. pub fn new() -> Self { Self { - event: Bytes::from_static(b":\n\n"), + event: Event::DEFAULT_KEEP_ALIVE, max_interval: Duration::from_secs(15), } } @@ -451,7 +491,7 @@ impl KeepAlive { /// Panics if `event` contains any newline or carriage returns, as they are not allowed in SSE /// comments. pub fn event(mut self, event: Event) -> Self { - self.event = event.finalize(); + self.event = Event::finalized(event.finalize()); self } } @@ -462,19 +502,25 @@ impl Default for KeepAlive { } } +#[cfg(feature = "tokio")] pin_project! { + /// A wrapper around a stream that produces keep-alive events #[derive(Debug)] - struct KeepAliveStream { - keep_alive: KeepAlive, + pub struct KeepAliveStream { #[pin] - alive_timer: Sleep, + alive_timer: tokio::time::Sleep, + #[pin] + inner: S, + keep_alive: KeepAlive, } } -impl KeepAliveStream { - fn new(keep_alive: KeepAlive) -> Self { +#[cfg(feature = "tokio")] +impl KeepAliveStream { + fn new(keep_alive: KeepAlive, inner: S) -> Self { Self { alive_timer: tokio::time::sleep(keep_alive.max_interval), + inner, keep_alive, } } @@ -484,17 +530,38 @@ impl KeepAliveStream { this.alive_timer .reset(tokio::time::Instant::now() + this.keep_alive.max_interval); } +} - fn poll_event(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { - let this = self.as_mut().project(); +#[cfg(feature = "tokio")] +impl Stream for KeepAliveStream +where + S: Stream>, +{ + type Item = Result; - ready!(this.alive_timer.poll(cx)); + fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { + use std::future::Future; - let event = this.keep_alive.event.clone(); + let mut this = self.as_mut().project(); - self.reset(); + match this.inner.as_mut().poll_next(cx) { + Poll::Ready(Some(Ok(event))) => { + self.reset(); - Poll::Ready(event) + Poll::Ready(Some(Ok(event))) + } + Poll::Ready(Some(Err(error))) => Poll::Ready(Some(Err(error))), + Poll::Ready(None) => Poll::Ready(None), + Poll::Pending => { + ready!(this.alive_timer.poll(cx)); + + let event = this.keep_alive.event.clone(); + + self.reset(); + + Poll::Ready(Some(Ok(event))) + } + } } } From 01ecea0e3381cd99bc08c4fe92631c23fec55385 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 13 May 2025 09:58:45 +0200 Subject: [PATCH 02/30] Make clippy happy (#3350) --- Cargo.toml | 1 - axum-macros/src/from_request/mod.rs | 9 +++++---- examples/http-proxy/src/main.rs | 2 +- examples/reverse-proxy/src/main.rs | 2 +- examples/sse/src/main.rs | 6 +++--- examples/unix-domain-socket/src/main.rs | 4 ++-- examples/websockets/src/client.rs | 6 +++--- examples/websockets/src/main.rs | 6 +++--- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cfbfb615..a9eeafcf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,6 @@ inefficient_to_string = "warn" linkedlist = "warn" lossy_float_literal = "warn" macro_use_imports = "warn" -match_on_vec_items = "warn" match_wildcard_for_single_variants = "warn" mem_forget = "warn" needless_borrow = "warn" diff --git a/axum-macros/src/from_request/mod.rs b/axum-macros/src/from_request/mod.rs index 145fdad3..38386365 100644 --- a/axum-macros/src/from_request/mod.rs +++ b/axum-macros/src/from_request/mod.rs @@ -775,10 +775,11 @@ fn impl_struct_by_extracting_all_at_once( .chain(via_marker_type) .collect::>(); - let ident_generics = generic_ident - .is_some() - .then(|| quote! { }) - .unwrap_or_default(); + let ident_generics = if generic_ident.is_some() { + quote! { } + } else { + TokenStream::new() + }; let rejection_bound = rejection.as_ref().map(|rejection| { match (tr, generic_ident.is_some()) { diff --git a/examples/http-proxy/src/main.rs b/examples/http-proxy/src/main.rs index 90aa5aa8..cf5ac15b 100644 --- a/examples/http-proxy/src/main.rs +++ b/examples/http-proxy/src/main.rs @@ -77,7 +77,7 @@ async fn main() { .with_upgrades() .await { - println!("Failed to serve connection: {:?}", err); + println!("Failed to serve connection: {err:?}"); } }); } diff --git a/examples/reverse-proxy/src/main.rs b/examples/reverse-proxy/src/main.rs index db391246..5f90019d 100644 --- a/examples/reverse-proxy/src/main.rs +++ b/examples/reverse-proxy/src/main.rs @@ -45,7 +45,7 @@ async fn handler(State(client): State, mut req: Request) -> Result) -> String { let host = host.into(); // Bind to localhost at the port 0, which will let the OS assign an available port to us - let listener = TcpListener::bind(format!("{}:0", host)).await.unwrap(); + let listener = TcpListener::bind(format!("{host}:0")).await.unwrap(); // Retrieve the port assigned to us by the OS let port = listener.local_addr().unwrap().port(); tokio::spawn(async { axum::serve(listener, app()).await.unwrap(); }); // Returns address (e.g. http://127.0.0.1{random_port}) - format!("http://{}:{}", host, port) + format!("http://{host}:{port}") } let listening_url = spawn_app("127.0.0.1").await; let mut event_stream = reqwest::Client::new() - .get(format!("{}/sse", listening_url)) + .get(format!("{listening_url}/sse")) .header("User-Agent", "integration_test") .send() .await diff --git a/examples/unix-domain-socket/src/main.rs b/examples/unix-domain-socket/src/main.rs index 07b38d91..4990ee97 100644 --- a/examples/unix-domain-socket/src/main.rs +++ b/examples/unix-domain-socket/src/main.rs @@ -59,7 +59,7 @@ mod unix { let (mut sender, conn) = hyper::client::conn::http1::handshake(stream).await.unwrap(); tokio::task::spawn(async move { if let Err(err) = conn.await { - println!("Connection failed: {:?}", err); + println!("Connection failed: {err:?}"); } }); @@ -79,7 +79,7 @@ mod unix { } async fn handler(ConnectInfo(info): ConnectInfo) -> &'static str { - println!("new connection from `{:?}`", info); + println!("new connection from `{info:?}`"); "Hello, World!" } diff --git a/examples/websockets/src/client.rs b/examples/websockets/src/client.rs index a3034131..14ed4527 100644 --- a/examples/websockets/src/client.rs +++ b/examples/websockets/src/client.rs @@ -129,13 +129,13 @@ fn process_message(msg: Message, who: usize) -> ControlFlow<(), ()> { println!(">>> {who} got str: {t:?}"); } Message::Binary(d) => { - println!(">>> {} got {} bytes: {:?}", who, d.len(), d); + println!(">>> {who} got {} bytes: {d:?}", d.len()); } Message::Close(c) => { if let Some(cf) = c { println!( - ">>> {} got close with code {} and reason `{}`", - who, cf.code, cf.reason + ">>> {who} got close with code {} and reason `{}`", + cf.code, cf.reason ); } else { println!(">>> {who} somehow got close message without CloseFrame"); diff --git a/examples/websockets/src/main.rs b/examples/websockets/src/main.rs index 18e8ee32..1bb7cadf 100644 --- a/examples/websockets/src/main.rs +++ b/examples/websockets/src/main.rs @@ -220,13 +220,13 @@ fn process_message(msg: Message, who: SocketAddr) -> ControlFlow<(), ()> { println!(">>> {who} sent str: {t:?}"); } Message::Binary(d) => { - println!(">>> {} sent {} bytes: {:?}", who, d.len(), d); + println!(">>> {who} sent {} bytes: {d:?}", d.len()); } Message::Close(c) => { if let Some(cf) = c { println!( - ">>> {} sent close with code {} and reason `{}`", - who, cf.code, cf.reason + ">>> {who} sent close with code {} and reason `{}`", + cf.code, cf.reason ); } else { println!(">>> {who} somehow sent close message without CloseFrame"); From 756bf0037f8837a1f3479c4c8ea329b1ea6b1ae6 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 26 May 2025 00:43:01 +0530 Subject: [PATCH 03/30] Implement the OptionalFromRequestParts trait for the Host extractor (#3177) --- axum-extra/src/extract/host.rs | 61 +++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 8 deletions(-) diff --git a/axum-extra/src/extract/host.rs b/axum-extra/src/extract/host.rs index a6828d30..e9eb91c5 100644 --- a/axum-extra/src/extract/host.rs +++ b/axum-extra/src/extract/host.rs @@ -1,10 +1,14 @@ use super::rejection::{FailedToResolveHost, HostRejection}; -use axum::extract::FromRequestParts; +use axum::{ + extract::{FromRequestParts, OptionalFromRequestParts}, + RequestPartsExt, +}; use http::{ header::{HeaderMap, FORWARDED}, request::Parts, uri::Authority, }; +use std::convert::Infallible; const X_FORWARDED_HOST_HEADER_KEY: &str = "X-Forwarded-Host"; @@ -31,8 +35,27 @@ where type Rejection = HostRejection; async fn from_request_parts(parts: &mut Parts, _state: &S) -> Result { + parts + .extract::>() + .await + .ok() + .flatten() + .ok_or(HostRejection::FailedToResolveHost(FailedToResolveHost)) + } +} + +impl OptionalFromRequestParts for Host +where + S: Send + Sync, +{ + type Rejection = Infallible; + + async fn from_request_parts( + parts: &mut Parts, + _state: &S, + ) -> Result, Self::Rejection> { if let Some(host) = parse_forwarded(&parts.headers) { - return Ok(Host(host.to_owned())); + return Ok(Some(Host(host.to_owned()))); } if let Some(host) = parts @@ -40,7 +63,7 @@ where .get(X_FORWARDED_HOST_HEADER_KEY) .and_then(|host| host.to_str().ok()) { - return Ok(Host(host.to_owned())); + return Ok(Some(Host(host.to_owned()))); } if let Some(host) = parts @@ -48,14 +71,14 @@ where .get(http::header::HOST) .and_then(|host| host.to_str().ok()) { - return Ok(Host(host.to_owned())); + return Ok(Some(Host(host.to_owned()))); } if let Some(authority) = parts.uri.authority() { - return Ok(Host(parse_authority(authority).to_owned())); + return Ok(Some(Host(parse_authority(authority).to_owned()))); } - Err(HostRejection::FailedToResolveHost(FailedToResolveHost)) + Ok(None) } } @@ -148,7 +171,7 @@ mod tests { async fn ip4_uri_host() { let mut parts = Request::new(()).into_parts().0; parts.uri = "https://127.0.0.1:1234/image.jpg".parse().unwrap(); - let host = Host::from_request_parts(&mut parts, &()).await.unwrap(); + let host = parts.extract::().await.unwrap(); assert_eq!(host.0, "127.0.0.1:1234"); } @@ -156,10 +179,32 @@ mod tests { async fn ip6_uri_host() { let mut parts = Request::new(()).into_parts().0; parts.uri = "http://cool:user@[::1]:456/file.txt".parse().unwrap(); - let host = Host::from_request_parts(&mut parts, &()).await.unwrap(); + let host = parts.extract::().await.unwrap(); assert_eq!(host.0, "[::1]:456"); } + #[crate::test] + async fn missing_host() { + let mut parts = Request::new(()).into_parts().0; + let host = parts.extract::().await.unwrap_err(); + assert!(matches!(host, HostRejection::FailedToResolveHost(_))); + } + + #[crate::test] + async fn optional_extractor() { + let mut parts = Request::new(()).into_parts().0; + parts.uri = "https://127.0.0.1:1234/image.jpg".parse().unwrap(); + let host = parts.extract::>().await.unwrap(); + assert!(host.is_some()); + } + + #[crate::test] + async fn optional_extractor_none() { + let mut parts = Request::new(()).into_parts().0; + let host = parts.extract::>().await.unwrap(); + assert!(host.is_none()); + } + #[test] fn forwarded_parsing() { // the basic case From f32223b2e941e969f79809338774444f828fdc03 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Wed, 28 May 2025 16:40:03 +0200 Subject: [PATCH 04/30] Implement `OptionalFromRequest` for `Multipart` (#3220) --- axum/src/extract/multipart.rs | 59 ++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/axum/src/extract/multipart.rs b/axum/src/extract/multipart.rs index 9f278f6d..3c6d8384 100644 --- a/axum/src/extract/multipart.rs +++ b/axum/src/extract/multipart.rs @@ -6,6 +6,7 @@ use super::{FromRequest, Request}; use crate::body::Bytes; use axum_core::{ __composite_rejection as composite_rejection, __define_rejection as define_rejection, + extract::OptionalFromRequest, response::{IntoResponse, Response}, RequestExt, }; @@ -71,13 +72,37 @@ where type Rejection = MultipartRejection; async fn from_request(req: Request, _state: &S) -> Result { - let boundary = parse_boundary(req.headers()).ok_or(InvalidBoundary)?; + let boundary = content_type_str(req.headers()) + .and_then(|content_type| multer::parse_boundary(content_type).ok()) + .ok_or(InvalidBoundary)?; let stream = req.with_limited_body().into_body(); let multipart = multer::Multipart::new(stream.into_data_stream(), boundary); Ok(Self { inner: multipart }) } } +impl OptionalFromRequest for Multipart +where + S: Send + Sync, +{ + type Rejection = MultipartRejection; + + async fn from_request(req: Request, _state: &S) -> Result, Self::Rejection> { + let Some(content_type) = content_type_str(req.headers()) else { + return Ok(None); + }; + match multer::parse_boundary(content_type) { + Ok(boundary) => { + let stream = req.with_limited_body().into_body(); + let multipart = multer::Multipart::new(stream.into_data_stream(), boundary); + Ok(Some(Self { inner: multipart })) + } + Err(multer::Error::NoMultipart) => Ok(None), + Err(_) => Err(MultipartRejection::InvalidBoundary(InvalidBoundary)), + } + } +} + impl Multipart { /// Yields the next [`Field`] if available. pub async fn next_field(&mut self) -> Result>, MultipartError> { @@ -282,9 +307,8 @@ impl IntoResponse for MultipartError { } } -fn parse_boundary(headers: &HeaderMap) -> Option { - let content_type = headers.get(CONTENT_TYPE)?.to_str().ok()?; - multer::parse_boundary(content_type).ok() +fn content_type_str(headers: &HeaderMap) -> Option<&str> { + headers.get(CONTENT_TYPE)?.to_str().ok() } composite_rejection! { @@ -378,4 +402,31 @@ mod tests { let res = client.post("/").multipart(form).await; assert_eq!(res.status(), StatusCode::PAYLOAD_TOO_LARGE); } + + #[crate::test] + async fn optional_multipart() { + const BYTES: &[u8] = "🦀".as_bytes(); + + async fn handle(multipart: Option) -> Result { + if let Some(mut multipart) = multipart { + while let Some(field) = multipart.next_field().await? { + field.bytes().await?; + } + Ok(StatusCode::OK) + } else { + Ok(StatusCode::NO_CONTENT) + } + } + + let app = Router::new().route("/", post(handle)); + let client = TestClient::new(app); + let form = + reqwest::multipart::Form::new().part("file", reqwest::multipart::Part::bytes(BYTES)); + + let res = client.post("/").multipart(form).await; + assert_eq!(res.status(), StatusCode::OK); + + let res = client.post("/").await; + assert_eq!(res.status(), StatusCode::NO_CONTENT); + } } From fc50f462e66a9e924cb93c9d846911967e0f57c3 Mon Sep 17 00:00:00 2001 From: Sabrina Jewson Date: Tue, 3 Jun 2025 13:21:22 +0100 Subject: [PATCH 05/30] Add `DefaultBodyLimit::apply` (#3368) --- axum-core/CHANGELOG.md | 7 +++++ axum-core/src/extract/default_body_limit.rs | 31 +++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/axum-core/CHANGELOG.md b/axum-core/CHANGELOG.md index cd59a078..10e99e56 100644 --- a/axum-core/CHANGELOG.md +++ b/axum-core/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +# Unreleased + +- **added:** `DefaultBodyLimit::apply` for changing the `DefaultBodyLimit` inside extractors. + ([#3368]) + +[#3368]: https://github.com/tokio-rs/axum/pull/3366 + # 0.5.2 - **added:** Implement `Stream::size_hint` for `BodyDataStream` ([#3195]) diff --git a/axum-core/src/extract/default_body_limit.rs b/axum-core/src/extract/default_body_limit.rs index b3fed6b8..bb1f44bf 100644 --- a/axum-core/src/extract/default_body_limit.rs +++ b/axum-core/src/extract/default_body_limit.rs @@ -1,4 +1,5 @@ use self::private::DefaultBodyLimitService; +use http::Request; use tower_layer::Layer; /// Layer for configuring the default request body limit. @@ -151,6 +152,36 @@ impl DefaultBodyLimit { kind: DefaultBodyLimitKind::Limit(limit), } } + + /// Apply a request body limit to the given request. + /// + /// This can be used, for example, to modify the default body limit inside a specific + /// extractor. + /// + /// # Example + /// + /// An extractor similar to [`Bytes`](bytes::Bytes), but limiting the body to 1 KB. + /// + /// ``` + /// use axum::{ + /// extract::{DefaultBodyLimit, FromRequest, rejection::BytesRejection, Request}, + /// body::Bytes, + /// }; + /// + /// struct Bytes1KB(Bytes); + /// + /// impl FromRequest for Bytes1KB { + /// type Rejection = BytesRejection; + /// + /// async fn from_request(mut req: Request, _: &S) -> Result { + /// DefaultBodyLimit::max(1024).apply(&mut req); + /// Ok(Self(Bytes::from_request(req, &()).await?)) + /// } + /// } + /// ``` + pub fn apply(self, req: &mut Request) { + req.extensions_mut().insert(self.kind); + } } impl Layer for DefaultBodyLimit { From d0d8088be1c093ffb2b80df33b179796d6e9d9bb Mon Sep 17 00:00:00 2001 From: zeon <96481337+zeonzip@users.noreply.github.com> Date: Fri, 27 Jun 2025 21:04:46 +0200 Subject: [PATCH 06/30] New redirect inspection (#3377) --- axum/src/response/redirect.rs | 75 ++++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 15 deletions(-) diff --git a/axum/src/response/redirect.rs b/axum/src/response/redirect.rs index 8bc6eb5e..4113c124 100644 --- a/axum/src/response/redirect.rs +++ b/axum/src/response/redirect.rs @@ -21,7 +21,7 @@ use http::{header::LOCATION, HeaderValue, StatusCode}; #[derive(Debug, Clone)] pub struct Redirect { status_code: StatusCode, - location: HeaderValue, + location: String, } impl Redirect { @@ -33,10 +33,6 @@ impl Redirect { /// body (if non-empty). If you want to preserve the request method and body, /// [`Redirect::temporary`] should be used instead. /// - /// # Panics - /// - /// If `uri` isn't a valid [`HeaderValue`]. - /// /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/303 pub fn to(uri: &str) -> Self { Self::with_status_code(StatusCode::SEE_OTHER, uri) @@ -47,10 +43,6 @@ impl Redirect { /// This has the same behavior as [`Redirect::to`], except it will preserve the original HTTP /// method and body. /// - /// # Panics - /// - /// If `uri` isn't a valid [`HeaderValue`]. - /// /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307 pub fn temporary(uri: &str) -> Self { Self::with_status_code(StatusCode::TEMPORARY_REDIRECT, uri) @@ -58,15 +50,21 @@ impl Redirect { /// Create a new [`Redirect`] that uses a [`308 Permanent Redirect`][mdn] status code. /// - /// # Panics - /// - /// If `uri` isn't a valid [`HeaderValue`]. - /// /// [mdn]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308 pub fn permanent(uri: &str) -> Self { Self::with_status_code(StatusCode::PERMANENT_REDIRECT, uri) } + /// Returns the HTTP status code of the `Redirect`. + pub fn status_code(&self) -> StatusCode { + self.status_code + } + + /// Returns the `Redirect`'s URI. + pub fn location(&self) -> &str { + &self.location + } + // This is intentionally not public since other kinds of redirects might not // use the `Location` header, namely `304 Not Modified`. // @@ -79,13 +77,60 @@ impl Redirect { Self { status_code, - location: HeaderValue::try_from(uri).expect("URI isn't a valid header value"), + location: uri.to_owned(), } } } impl IntoResponse for Redirect { fn into_response(self) -> Response { - (self.status_code, [(LOCATION, self.location)]).into_response() + match HeaderValue::try_from(self.location) { + Ok(location) => (self.status_code, [(LOCATION, location)]).into_response(), + Err(error) => (StatusCode::INTERNAL_SERVER_ERROR, error.to_string()).into_response(), + } + } +} + +#[cfg(test)] +mod tests { + use super::Redirect; + use axum_core::response::IntoResponse; + use http::StatusCode; + + const EXAMPLE_URL: &str = "https://example.com"; + + // Tests to make sure Redirect has the correct status codes + // based on the way it was constructed. + #[test] + fn correct_status() { + assert_eq!( + StatusCode::SEE_OTHER, + Redirect::to(EXAMPLE_URL).status_code() + ); + + assert_eq!( + StatusCode::TEMPORARY_REDIRECT, + Redirect::temporary(EXAMPLE_URL).status_code() + ); + + assert_eq!( + StatusCode::PERMANENT_REDIRECT, + Redirect::permanent(EXAMPLE_URL).status_code() + ); + } + + #[test] + fn correct_location() { + assert_eq!(EXAMPLE_URL, Redirect::permanent(EXAMPLE_URL).location()); + + assert_eq!("/redirect", Redirect::permanent("/redirect").location()) + } + + #[test] + fn test_internal_error() { + let response = Redirect::permanent("Axum is awesome, \n but newlines aren't allowed :(") + .into_response(); + + assert_eq!(response.status(), StatusCode::INTERNAL_SERVER_ERROR); } } From 62586fa4920449a6de93e5f870aac74ef50a2169 Mon Sep 17 00:00:00 2001 From: Theodore Bjernhed <153222593+theodorebje@users.noreply.github.com> Date: Tue, 1 Jul 2025 23:01:54 +0200 Subject: [PATCH 07/30] style: Reorder macro-generated items to fix lints (#3392) --- axum-macros/src/debug_handler.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/axum-macros/src/debug_handler.rs b/axum-macros/src/debug_handler.rs index 82f38328..73dd9f23 100644 --- a/axum-macros/src/debug_handler.rs +++ b/axum-macros/src/debug_handler.rs @@ -681,10 +681,10 @@ fn check_output_impls_into_response(item_fn: &ItemFn) -> TokenStream { #[allow(unreachable_code)] #[doc(hidden)] async fn #name() { - let value = #receiver #make_value_name().await; fn check(_: T) where T: ::axum::response::IntoResponse {} + let value = #receiver #make_value_name().await; check(value); } } @@ -696,12 +696,12 @@ fn check_output_impls_into_response(item_fn: &ItemFn) -> TokenStream { async fn #name() { #make - let value = #make_value_name().await; - fn check(_: T) where T: ::axum::response::IntoResponse {} + let value = #make_value_name().await; + check(value); } } @@ -732,10 +732,13 @@ fn check_future_send(item_fn: &ItemFn, kind: FunctionKind) -> TokenStream { let name = format_ident!("__axum_macros_check_{}_future", item_fn.sig.ident); - let do_check = quote! { + let define_check = quote! { fn check(_: T) where T: ::std::future::Future + Send {} + }; + + let do_check = quote! { check(future); }; @@ -745,6 +748,7 @@ fn check_future_send(item_fn: &ItemFn, kind: FunctionKind) -> TokenStream { #[allow(unreachable_code)] #[doc(hidden)] fn #name() { + #define_check let future = #receiver #handler_name(#(#args),*); #do_check } @@ -756,6 +760,7 @@ fn check_future_send(item_fn: &ItemFn, kind: FunctionKind) -> TokenStream { #[doc(hidden)] fn #name() { #item_fn + #define_check let future = #handler_name(#(#args),*); #do_check } From 3a18eb61084bc823b579f1e5f1af1e3067b00d9b Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 5 Jul 2025 23:47:42 +0900 Subject: [PATCH 08/30] Update tokio-tungstenite to 0.27 (#3398) --- Cargo.lock | 134 ++++++++++++++++++------- axum/Cargo.toml | 4 +- deny.toml | 2 + examples/testing-websockets/Cargo.toml | 2 +- examples/websockets/Cargo.toml | 2 +- 5 files changed, 105 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cbf72bfb..0b394586 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,7 +59,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if 1.0.0", - "getrandom", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -228,7 +228,7 @@ dependencies = [ "chrono", "hmac 0.11.0", "log", - "rand", + "rand 0.8.5", "serde", "serde_json", "sha2 0.9.9", @@ -704,7 +704,7 @@ dependencies = [ "indexmap 2.7.0", "js-sys", "once_cell", - "rand", + "rand 0.8.5", "serde", "serde_bytes", "serde_json", @@ -865,7 +865,7 @@ dependencies = [ "hkdf", "hmac 0.12.1", "percent-encoding", - "rand", + "rand 0.8.5", "sha2 0.10.8", "subtle", "time", @@ -952,7 +952,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "typenum", ] @@ -2205,10 +2205,22 @@ dependencies = [ "cfg-if 1.0.0", "js-sys", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", +] + [[package]] name = "ghash" version = "0.5.1" @@ -2368,7 +2380,7 @@ dependencies = [ "idna 1.0.3", "ipnet", "once_cell", - "rand", + "rand 0.8.5", "thiserror 1.0.69", "tinyvec", "tokio", @@ -2389,7 +2401,7 @@ dependencies = [ "lru-cache", "once_cell", "parking_lot", - "rand", + "rand 0.8.5", "resolv-conf", "smallvec", "thiserror 1.0.69", @@ -3181,7 +3193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", ] @@ -3211,7 +3223,7 @@ dependencies = [ "once_cell", "pbkdf2", "percent-encoding", - "rand", + "rand 0.8.5", "rustc_version_runtime", "rustls 0.21.12", "rustls-pemfile 1.0.4", @@ -3320,7 +3332,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand", + "rand 0.8.5", "smallvec", "zeroize", ] @@ -3379,9 +3391,9 @@ checksum = "c38841cdd844847e3e7c8d29cef9dcfed8877f8f56f9071f77843ecf3baf937f" dependencies = [ "base64 0.13.1", "chrono", - "getrandom", + "getrandom 0.2.15", "http 0.2.12", - "rand", + "rand 0.8.5", "reqwest 0.11.27", "serde", "serde_json", @@ -3639,7 +3651,7 @@ dependencies = [ "hmac 0.12.1", "md-5", "memchr", - "rand", + "rand 0.8.5", "sha2 0.10.8", "stringprep", ] @@ -3755,7 +3767,7 @@ dependencies = [ "libc", "once_cell", "raw-cpuid", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "web-sys", "winapi", ] @@ -3774,7 +3786,7 @@ checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" dependencies = [ "env_logger", "log", - "rand", + "rand 0.8.5", ] [[package]] @@ -3813,8 +3825,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" dependencies = [ "bytes", - "getrandom", - "rand", + "getrandom 0.2.15", + "rand 0.8.5", "ring", "rustc-hash 2.1.0", "rustls 0.23.20", @@ -3849,6 +3861,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "radium" version = "0.7.0" @@ -3862,8 +3880,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", ] [[package]] @@ -3873,7 +3901,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -3882,7 +3920,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.3", ] [[package]] @@ -4098,7 +4145,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if 1.0.0", - "getrandom", + "getrandom 0.2.15", "libc", "spin", "untrusted", @@ -4118,7 +4165,7 @@ dependencies = [ "num-traits", "pkcs1", "pkcs8", - "rand_core", + "rand_core 0.6.4", "signature", "spki", "subtle", @@ -4526,7 +4573,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -4733,7 +4780,7 @@ dependencies = [ "memchr", "once_cell", "percent-encoding", - "rand", + "rand 0.8.5", "rsa", "serde", "sha1", @@ -4772,7 +4819,7 @@ dependencies = [ "md-5", "memchr", "once_cell", - "rand", + "rand 0.8.5", "serde", "serde_json", "sha2 0.10.8", @@ -5141,7 +5188,7 @@ dependencies = [ "pin-project-lite", "postgres-protocol", "postgres-types", - "rand", + "rand 0.8.5", "socket2", "tokio", "tokio-util", @@ -5181,9 +5228,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.26.1" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4bf6fecd69fcdede0ec680aaf474cdab988f9de6bc73d3758f0160e3b7025a" +checksum = "489a59b6730eda1b0171fcfda8b121f4bee2b35cba8645ca35c5f7ba3eb736c1" dependencies = [ "futures-util", "log", @@ -5441,17 +5488,16 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.26.1" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413083a99c579593656008130e29255e54dcaae495be556cc26888f211648c24" +checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d" dependencies = [ - "byteorder", "bytes", "data-encoding", "http 1.2.0", "httparse", "log", - "rand", + "rand 0.9.1", "sha1", "thiserror 2.0.9", "utf-8", @@ -5575,7 +5621,7 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ - "getrandom", + "getrandom 0.2.15", "serde", ] @@ -5642,6 +5688,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasite" version = "0.1.0" @@ -6029,6 +6084,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "write16" version = "1.0.0" diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 237934e5..69336457 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -82,7 +82,7 @@ serde_path_to_error = { version = "0.1.8", optional = true } serde_urlencoded = { version = "0.7", optional = true } sha1 = { version = "0.10", optional = true } tokio = { package = "tokio", version = "1.44", features = ["time"], optional = true } -tokio-tungstenite = { version = "0.26.0", optional = true } +tokio-tungstenite = { version = "0.27.0", optional = true } tracing = { version = "0.1", default-features = false, optional = true } [dependencies.tower-http] @@ -133,7 +133,7 @@ serde_json = { version = "1.0", features = ["raw_value"] } time = { version = "0.3", features = ["serde-human-readable"] } tokio = { package = "tokio", version = "1.44.2", features = ["macros", "rt", "rt-multi-thread", "net", "test-util"] } tokio-stream = "0.1" -tokio-tungstenite = "0.26.0" +tokio-tungstenite = "0.27.0" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["json"] } uuid = { version = "1.0", features = ["serde", "v4"] } diff --git a/deny.toml b/deny.toml index c32c8715..cf796d19 100644 --- a/deny.toml +++ b/deny.toml @@ -38,6 +38,8 @@ skip-tree = [ { name = "tower" }, # tower hasn't upgraded to 1.0 yet { name = "sync_wrapper" }, + # pulled in by quickcheck and cookie + { name = "rand" }, ] [sources] diff --git a/examples/testing-websockets/Cargo.toml b/examples/testing-websockets/Cargo.toml index 8942f9e2..b7bb17c3 100644 --- a/examples/testing-websockets/Cargo.toml +++ b/examples/testing-websockets/Cargo.toml @@ -8,4 +8,4 @@ publish = false axum = { path = "../../axum", features = ["ws"] } futures = "0.3" tokio = { version = "1.0", features = ["full"] } -tokio-tungstenite = "0.26" +tokio-tungstenite = "0.27" diff --git a/examples/websockets/Cargo.toml b/examples/websockets/Cargo.toml index 0c1eb36a..ef75c353 100644 --- a/examples/websockets/Cargo.toml +++ b/examples/websockets/Cargo.toml @@ -11,7 +11,7 @@ futures = "0.3" futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] } headers = "0.4" tokio = { version = "1.0", features = ["full"] } -tokio-tungstenite = "0.26.0" +tokio-tungstenite = "0.27.0" tower-http = { version = "0.6.1", features = ["fs", "trace"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } From 384f3938579399fead8093a5ba026904437b6b56 Mon Sep 17 00:00:00 2001 From: Theodore Bjernhed <153222593+theodorebje@users.noreply.github.com> Date: Sat, 5 Jul 2025 19:07:24 +0200 Subject: [PATCH 09/30] Add #[must_use] to types and methods (#3395) Co-authored-by: Theodore Bjernhed --- Cargo.toml | 2 ++ axum-core/src/body.rs | 2 ++ axum-core/src/error.rs | 1 + axum-core/src/macros.rs | 4 ++++ axum-extra/src/extract/cookie/mod.rs | 4 ++-- axum-extra/src/extract/cookie/private.rs | 6 ++++-- axum-extra/src/extract/cookie/signed.rs | 6 ++++-- axum-extra/src/extract/multipart.rs | 5 +++++ axum-extra/src/response/file_stream.rs | 1 + axum-extra/src/response/multiple.rs | 3 +++ axum-extra/src/routing/mod.rs | 2 ++ axum-extra/src/typed_header.rs | 2 ++ axum/src/extract/matched_path.rs | 1 + axum/src/extract/multipart.rs | 6 ++++++ axum/src/extract/nested_path.rs | 1 + axum/src/extract/path/mod.rs | 6 ++++++ axum/src/extract/ws.rs | 2 ++ axum/src/response/redirect.rs | 2 ++ axum/src/routing/method_filter.rs | 1 + axum/src/routing/method_routing.rs | 2 ++ axum/src/routing/mod.rs | 4 ++++ axum/src/test_helpers/test_client.rs | 2 ++ 22 files changed, 59 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a9eeafcf..fe3bd728 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,10 +35,12 @@ lossy_float_literal = "warn" macro_use_imports = "warn" match_wildcard_for_single_variants = "warn" mem_forget = "warn" +must_use_candidate = "warn" needless_borrow = "warn" needless_continue = "warn" option_option = "warn" rest_pat_in_fully_bound_structs = "warn" +return_self_not_must_use = "warn" str_to_string = "warn" suboptimal_flops = "warn" todo = "warn" diff --git a/axum-core/src/body.rs b/axum-core/src/body.rs index 6c49970b..cbc5606b 100644 --- a/axum-core/src/body.rs +++ b/axum-core/src/body.rs @@ -34,6 +34,7 @@ where } /// The body type used in axum requests and responses. +#[must_use] #[derive(Debug)] pub struct Body(BoxBody); @@ -135,6 +136,7 @@ impl http_body::Body for Body { /// A stream of data frames. /// /// Created with [`Body::into_data_stream`]. +#[must_use] #[derive(Debug)] pub struct BodyDataStream { inner: Body, diff --git a/axum-core/src/error.rs b/axum-core/src/error.rs index 8c522c72..e77340e3 100644 --- a/axum-core/src/error.rs +++ b/axum-core/src/error.rs @@ -16,6 +16,7 @@ impl Error { } /// Convert an `Error` back into the underlying boxed trait object. + #[must_use] pub fn into_inner(self) -> BoxError { self.inner } diff --git a/axum-core/src/macros.rs b/axum-core/src/macros.rs index 8f276248..6bc24c30 100644 --- a/axum-core/src/macros.rs +++ b/axum-core/src/macros.rs @@ -106,11 +106,13 @@ macro_rules! __define_rejection { } /// Get the response body text used for this rejection. + #[must_use] pub fn body_text(&self) -> String { self.to_string() } /// Get the status code used for this rejection. + #[must_use] pub fn status(&self) -> http::StatusCode { http::StatusCode::$status } @@ -179,6 +181,7 @@ macro_rules! __composite_rejection { impl $name { /// Get the response body text used for this rejection. + #[must_use] pub fn body_text(&self) -> String { match self { $( @@ -188,6 +191,7 @@ macro_rules! __composite_rejection { } /// Get the status code used for this rejection. + #[must_use] pub fn status(&self) -> http::StatusCode { match self { $( diff --git a/axum-extra/src/extract/cookie/mod.rs b/axum-extra/src/extract/cookie/mod.rs index 50fa6031..5bd110b8 100644 --- a/axum-extra/src/extract/cookie/mod.rs +++ b/axum-extra/src/extract/cookie/mod.rs @@ -84,6 +84,7 @@ pub use cookie::Key; /// .route("/me", get(me)); /// # let app: Router = app; /// ``` +#[must_use = "`CookieJar` should be returned as part of a `Response`, otherwise it does nothing."] #[derive(Debug, Default, Clone)] pub struct CookieJar { jar: cookie::CookieJar, @@ -153,6 +154,7 @@ impl CookieJar { /// .map(|cookie| cookie.value().to_owned()); /// } /// ``` + #[must_use] pub fn get(&self, name: &str) -> Option<&Cookie<'static>> { self.jar.get(name) } @@ -169,7 +171,6 @@ impl CookieJar { /// jar.remove(Cookie::from("foo")) /// } /// ``` - #[must_use] pub fn remove>>(mut self, cookie: C) -> Self { self.jar.remove(cookie); self @@ -189,7 +190,6 @@ impl CookieJar { /// jar.add(Cookie::new("foo", "bar")) /// } /// ``` - #[must_use] #[allow(clippy::should_implement_trait)] pub fn add>>(mut self, cookie: C) -> Self { self.jar.add(cookie); diff --git a/axum-extra/src/extract/cookie/private.rs b/axum-extra/src/extract/cookie/private.rs index f852b8c4..85f21f85 100644 --- a/axum-extra/src/extract/cookie/private.rs +++ b/axum-extra/src/extract/cookie/private.rs @@ -104,6 +104,7 @@ use std::{convert::Infallible, fmt, marker::PhantomData}; /// } /// } /// ``` +#[must_use = "`PrivateCookieJar` should be returned as part of a `Response`, otherwise it does nothing."] pub struct PrivateCookieJar { jar: cookie::CookieJar, key: Key, @@ -201,6 +202,7 @@ impl PrivateCookieJar { /// .map(|cookie| cookie.value().to_owned()); /// } /// ``` + #[must_use] pub fn get(&self, name: &str) -> Option> { self.private_jar().get(name) } @@ -217,7 +219,6 @@ impl PrivateCookieJar { /// jar.remove(Cookie::from("foo")) /// } /// ``` - #[must_use] pub fn remove>>(mut self, cookie: C) -> Self { self.private_jar_mut().remove(cookie); self @@ -237,7 +238,6 @@ impl PrivateCookieJar { /// jar.add(Cookie::new("foo", "bar")) /// } /// ``` - #[must_use] #[allow(clippy::should_implement_trait)] pub fn add>>(mut self, cookie: C) -> Self { self.private_jar_mut().add(cookie); @@ -246,6 +246,7 @@ impl PrivateCookieJar { /// Authenticates and decrypts `cookie`, returning the plaintext version if decryption succeeds /// or `None` otherwise. + #[must_use] pub fn decrypt(&self, cookie: Cookie<'static>) -> Option> { self.private_jar().decrypt(cookie) } @@ -284,6 +285,7 @@ impl IntoResponse for PrivateCookieJar { } } +#[must_use = "iterators are lazy and do nothing unless consumed"] struct PrivateCookieJarIter<'a, K> { jar: &'a PrivateCookieJar, iter: cookie::Iter<'a>, diff --git a/axum-extra/src/extract/cookie/signed.rs b/axum-extra/src/extract/cookie/signed.rs index 92bf9171..f0e07e75 100644 --- a/axum-extra/src/extract/cookie/signed.rs +++ b/axum-extra/src/extract/cookie/signed.rs @@ -121,6 +121,7 @@ use std::{convert::Infallible, fmt, marker::PhantomData}; /// } /// } /// ``` +#[must_use = "`SignedCookieJar` should be returned as part of a `Response`, otherwise it does nothing."] pub struct SignedCookieJar { jar: cookie::CookieJar, key: Key, @@ -219,6 +220,7 @@ impl SignedCookieJar { /// .map(|cookie| cookie.value().to_owned()); /// } /// ``` + #[must_use] pub fn get(&self, name: &str) -> Option> { self.signed_jar().get(name) } @@ -235,7 +237,6 @@ impl SignedCookieJar { /// jar.remove(Cookie::from("foo")) /// } /// ``` - #[must_use] pub fn remove>>(mut self, cookie: C) -> Self { self.signed_jar_mut().remove(cookie); self @@ -255,7 +256,6 @@ impl SignedCookieJar { /// jar.add(Cookie::new("foo", "bar")) /// } /// ``` - #[must_use] #[allow(clippy::should_implement_trait)] pub fn add>>(mut self, cookie: C) -> Self { self.signed_jar_mut().add(cookie); @@ -264,6 +264,7 @@ impl SignedCookieJar { /// Verifies the authenticity and integrity of `cookie`, returning the plaintext version if /// verification succeeds or `None` otherwise. + #[must_use] pub fn verify(&self, cookie: Cookie<'static>) -> Option> { self.signed_jar().verify(cookie) } @@ -302,6 +303,7 @@ impl IntoResponse for SignedCookieJar { } } +#[must_use = "iterators are lazy and do nothing unless consumed"] struct SignedCookieJarIter<'a, K> { jar: &'a SignedCookieJar, iter: cookie::Iter<'a>, diff --git a/axum-extra/src/extract/multipart.rs b/axum-extra/src/extract/multipart.rs index 21769824..cc2e38cb 100644 --- a/axum-extra/src/extract/multipart.rs +++ b/axum-extra/src/extract/multipart.rs @@ -150,6 +150,7 @@ impl Field { /// The field name found in the /// [`Content-Disposition`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) /// header. + #[must_use] pub fn name(&self) -> Option<&str> { self.inner.name() } @@ -157,16 +158,19 @@ impl Field { /// The file name found in the /// [`Content-Disposition`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) /// header. + #[must_use] pub fn file_name(&self) -> Option<&str> { self.inner.file_name() } /// Get the [content type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) of the field. + #[must_use] pub fn content_type(&self) -> Option<&str> { self.inner.content_type().map(|m| m.as_ref()) } /// Get a map of headers as [`HeaderMap`]. + #[must_use] pub fn headers(&self) -> &HeaderMap { self.inner.headers() } @@ -253,6 +257,7 @@ impl MultipartError { } /// Get the status code used for this rejection. + #[must_use] pub fn status(&self) -> http::StatusCode { status_code_from_multer_error(&self.source) } diff --git a/axum-extra/src/response/file_stream.rs b/axum-extra/src/response/file_stream.rs index 1faa97f1..b725836a 100644 --- a/axum-extra/src/response/file_stream.rs +++ b/axum-extra/src/response/file_stream.rs @@ -44,6 +44,7 @@ use tokio_util::io::ReaderStream; /// let app = Router::new().route("/file-stream", get(file_stream)); /// # let _: Router = app; /// ``` +#[must_use] #[derive(Debug)] pub struct FileStream { /// stream. diff --git a/axum-extra/src/response/multiple.rs b/axum-extra/src/response/multiple.rs index 390ef3e7..a8295378 100644 --- a/axum-extra/src/response/multiple.rs +++ b/axum-extra/src/response/multiple.rs @@ -8,6 +8,7 @@ use mime::Mime; /// Create multipart forms to be used in API responses. /// /// This struct implements [`IntoResponse`], and so it can be returned from a handler. +#[must_use] #[derive(Debug)] pub struct MultipartForm { parts: Vec, @@ -103,6 +104,7 @@ impl Part { /// let parts: Vec = vec![Part::text("foo".to_string(), "abc")]; /// let form = MultipartForm::from_iter(parts); /// ``` + #[must_use] pub fn text(name: String, contents: &str) -> Self { Self { name, @@ -127,6 +129,7 @@ impl Part { /// let parts: Vec = vec![Part::file("foo", "foo.txt", vec![0x68, 0x68, 0x20, 0x6d, 0x6f, 0x6d])]; /// let form = MultipartForm::from_iter(parts); /// ``` + #[must_use] pub fn file(field_name: &str, file_name: &str, contents: Vec) -> Self { Self { name: field_name.to_owned(), diff --git a/axum-extra/src/routing/mod.rs b/axum-extra/src/routing/mod.rs index cf85dc53..45cb180e 100644 --- a/axum-extra/src/routing/mod.rs +++ b/axum-extra/src/routing/mod.rs @@ -28,6 +28,7 @@ pub use self::typed::{SecondElementIs, TypedPath}; // Validates a path at compile time, used with the vpath macro. #[rustversion::since(1.80)] #[doc(hidden)] +#[must_use] pub const fn __private_validate_static_path(path: &'static str) -> &'static str { if path.is_empty() { panic!("Paths must start with a `/`. Use \"/\" for root routes") @@ -76,6 +77,7 @@ macro_rules! vpath { } /// Extension trait that adds additional methods to [`Router`]. +#[allow(clippy::return_self_not_must_use)] pub trait RouterExt: sealed::Sealed { /// Add a typed `GET` route to the router. /// diff --git a/axum-extra/src/typed_header.rs b/axum-extra/src/typed_header.rs index 7c08be9e..41cf9181 100644 --- a/axum-extra/src/typed_header.rs +++ b/axum-extra/src/typed_header.rs @@ -137,11 +137,13 @@ pub struct TypedHeaderRejection { impl TypedHeaderRejection { /// Name of the header that caused the rejection + #[must_use] pub fn name(&self) -> &http::header::HeaderName { self.name } /// Reason why the header extraction has failed + #[must_use] pub fn reason(&self) -> &TypedHeaderRejectionReason { &self.reason } diff --git a/axum/src/extract/matched_path.rs b/axum/src/extract/matched_path.rs index 0f5efba3..1dda9235 100644 --- a/axum/src/extract/matched_path.rs +++ b/axum/src/extract/matched_path.rs @@ -58,6 +58,7 @@ pub struct MatchedPath(pub(crate) Arc); impl MatchedPath { /// Returns a `str` representation of the path. + #[must_use] pub fn as_str(&self) -> &str { &self.0 } diff --git a/axum/src/extract/multipart.rs b/axum/src/extract/multipart.rs index 3c6d8384..086033e0 100644 --- a/axum/src/extract/multipart.rs +++ b/axum/src/extract/multipart.rs @@ -146,6 +146,7 @@ impl Field<'_> { /// The field name found in the /// [`Content-Disposition`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) /// header. + #[must_use] pub fn name(&self) -> Option<&str> { self.inner.name() } @@ -153,16 +154,19 @@ impl Field<'_> { /// The file name found in the /// [`Content-Disposition`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) /// header. + #[must_use] pub fn file_name(&self) -> Option<&str> { self.inner.file_name() } /// Get the [content type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) of the field. + #[must_use] pub fn content_type(&self) -> Option<&str> { self.inner.content_type().map(|m| m.as_ref()) } /// Get a map of headers as [`HeaderMap`]. + #[must_use] pub fn headers(&self) -> &HeaderMap { self.inner.headers() } @@ -238,11 +242,13 @@ impl MultipartError { } /// Get the response body text used for this rejection. + #[must_use] pub fn body_text(&self) -> String { self.source.to_string() } /// Get the status code used for this rejection. + #[must_use] pub fn status(&self) -> http::StatusCode { status_code_from_multer_error(&self.source) } diff --git a/axum/src/extract/nested_path.rs b/axum/src/extract/nested_path.rs index 2e58d0e8..1d2c255e 100644 --- a/axum/src/extract/nested_path.rs +++ b/axum/src/extract/nested_path.rs @@ -41,6 +41,7 @@ pub struct NestedPath(Arc); impl NestedPath { /// Returns a `str` representation of the path. + #[must_use] pub fn as_str(&self) -> &str { &self.0 } diff --git a/axum/src/extract/path/mod.rs b/axum/src/extract/path/mod.rs index f37fff4d..a03ddc0d 100644 --- a/axum/src/extract/path/mod.rs +++ b/axum/src/extract/path/mod.rs @@ -279,6 +279,7 @@ impl std::error::Error for PathDeserializationError {} /// This type is obtained through [`FailedToDeserializePathParams::kind`] or /// [`FailedToDeserializePathParams::into_kind`] and is useful for building /// more precise error messages. +#[must_use] #[derive(Debug, PartialEq, Eq)] #[non_exhaustive] pub enum ErrorKind { @@ -417,6 +418,7 @@ impl FailedToDeserializePathParams { } /// Get the response body text used for this rejection. + #[must_use] pub fn body_text(&self) -> String { match self.0.kind { ErrorKind::Message(_) @@ -432,6 +434,7 @@ impl FailedToDeserializePathParams { } /// Get the status code used for this rejection. + #[must_use] pub fn status(&self) -> StatusCode { match self.0.kind { ErrorKind::Message(_) @@ -523,6 +526,7 @@ where impl RawPathParams { /// Get an iterator over the path parameters. + #[must_use] pub fn iter(&self) -> RawPathParamsIter<'_> { self.into_iter() } @@ -561,11 +565,13 @@ pub struct InvalidUtf8InPathParam { impl InvalidUtf8InPathParam { /// Get the response body text used for this rejection. + #[must_use] pub fn body_text(&self) -> String { self.to_string() } /// Get the status code used for this rejection. + #[must_use] pub fn status(&self) -> StatusCode { StatusCode::BAD_REQUEST } diff --git a/axum/src/extract/ws.rs b/axum/src/extract/ws.rs index 11ed5740..5ac3f622 100644 --- a/axum/src/extract/ws.rs +++ b/axum/src/extract/ws.rs @@ -129,6 +129,7 @@ use tokio_tungstenite::{ /// /// [`MethodFilter`]: crate::routing::MethodFilter #[cfg_attr(docsrs, doc(cfg(feature = "ws")))] +#[must_use] pub struct WebSocketUpgrade { config: WebSocketConfig, /// The chosen protocol sent in the `Sec-WebSocket-Protocol` header of the response. @@ -581,6 +582,7 @@ pub struct Utf8Bytes(ts::Utf8Bytes); impl Utf8Bytes { /// Creates from a static str. #[inline] + #[must_use] pub const fn from_static(str: &'static str) -> Self { Self(ts::Utf8Bytes::from_static(str)) } diff --git a/axum/src/response/redirect.rs b/axum/src/response/redirect.rs index 4113c124..e33928cd 100644 --- a/axum/src/response/redirect.rs +++ b/axum/src/response/redirect.rs @@ -56,11 +56,13 @@ impl Redirect { } /// Returns the HTTP status code of the `Redirect`. + #[must_use] pub fn status_code(&self) -> StatusCode { self.status_code } /// Returns the `Redirect`'s URI. + #[must_use] pub fn location(&self) -> &str { &self.location } diff --git a/axum/src/routing/method_filter.rs b/axum/src/routing/method_filter.rs index 040783ec..bd4593e8 100644 --- a/axum/src/routing/method_filter.rs +++ b/axum/src/routing/method_filter.rs @@ -58,6 +58,7 @@ impl MethodFilter { } /// Performs the OR operation between the [`MethodFilter`] in `self` with `other`. + #[must_use] pub const fn or(self, other: Self) -> Self { Self(self.0 | other.0) } diff --git a/axum/src/routing/method_routing.rs b/axum/src/routing/method_routing.rs index 42e46612..5dee1e47 100644 --- a/axum/src/routing/method_routing.rs +++ b/axum/src/routing/method_routing.rs @@ -703,6 +703,7 @@ impl MethodRouter<(), Infallible> { /// ``` /// /// [`MakeService`]: tower::make::MakeService + #[must_use] pub fn into_make_service(self) -> IntoMakeService { IntoMakeService::new(self.with_state(())) } @@ -736,6 +737,7 @@ impl MethodRouter<(), Infallible> { /// [`MakeService`]: tower::make::MakeService /// [`Router::into_make_service_with_connect_info`]: crate::routing::Router::into_make_service_with_connect_info #[cfg(feature = "tokio")] + #[must_use] pub fn into_make_service_with_connect_info(self) -> IntoMakeServiceWithConnectInfo { IntoMakeServiceWithConnectInfo::new(self.with_state(())) } diff --git a/axum/src/routing/mod.rs b/axum/src/routing/mod.rs index 2edf5ca1..90238c10 100644 --- a/axum/src/routing/mod.rs +++ b/axum/src/routing/mod.rs @@ -335,6 +335,7 @@ where } /// True if the router currently has at least one route added. + #[must_use] pub fn has_routes(&self) -> bool { self.inner.path_router.has_routes() } @@ -495,6 +496,7 @@ where /// /// This is the same as [`Router::as_service`] instead it returns an owned [`Service`]. See /// that method for more details. + #[must_use] pub fn into_service(self) -> RouterIntoService { RouterIntoService { router: self, @@ -522,6 +524,7 @@ impl Router { /// ``` /// /// [`MakeService`]: tower::make::MakeService + #[must_use] pub fn into_make_service(self) -> IntoMakeService { // call `Router::with_state` such that everything is turned into `Route` eagerly // rather than doing that per request @@ -530,6 +533,7 @@ impl Router { #[doc = include_str!("../docs/routing/into_make_service_with_connect_info.md")] #[cfg(feature = "tokio")] + #[must_use] pub fn into_make_service_with_connect_info(self) -> IntoMakeServiceWithConnectInfo { // call `Router::with_state` such that everything is turned into `Route` eagerly // rather than doing that per request diff --git a/axum/src/test_helpers/test_client.rs b/axum/src/test_helpers/test_client.rs index 3981db5a..c5e74877 100644 --- a/axum/src/test_helpers/test_client.rs +++ b/axum/src/test_helpers/test_client.rs @@ -83,11 +83,13 @@ impl TestClient { } #[allow(dead_code)] + #[must_use] pub fn server_port(&self) -> u16 { self.addr.port() } } +#[must_use] pub struct RequestBuilder { builder: reqwest::RequestBuilder, } From c1ff1539e3063a1fe85e0ba8dc0d9f9ce0e83f60 Mon Sep 17 00:00:00 2001 From: Glen De Cauwsemaecker Date: Wed, 9 Jul 2025 12:20:05 +0200 Subject: [PATCH 10/30] sse: Add space between duration and `:` (#3403) --- axum/src/response/sse.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/axum/src/response/sse.rs b/axum/src/response/sse.rs index 12cb65bf..48c6a43e 100644 --- a/axum/src/response/sse.rs +++ b/axum/src/response/sse.rs @@ -306,7 +306,7 @@ impl Event { self } - /// Set the event's retry timeout field (`retry:`). + /// Set the event's retry timeout field (`retry: `). /// /// This sets how long clients will wait before reconnecting if they are disconnected from the /// SSE endpoint. Note that this is just a hint: clients are free to wait for longer if they @@ -322,7 +322,7 @@ impl Event { self.flags.insert(EventFlags::HAS_RETRY); let buffer = self.buffer.as_mut(); - buffer.extend_from_slice(b"retry:"); + buffer.extend_from_slice(b"retry: "); let secs = duration.as_secs(); let millis = duration.subsec_millis(); From 25549f0ba2193beed12960aa0bd88a0ce2ba3aa4 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 20 Jul 2025 09:47:56 +0200 Subject: [PATCH 11/30] Update minimum Rust version to 1.78 (#3412) --- .github/workflows/CI.yml | 2 +- Cargo.lock | 1 - Cargo.toml | 2 +- axum-core/src/extract/mod.rs | 14 ++++---------- axum/Cargo.toml | 1 - axum/README.md | 2 +- axum/src/handler/mod.rs | 7 ++----- 7 files changed, 9 insertions(+), 20 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b19b3aa7..fa9d8b5c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,7 +2,7 @@ name: CI env: CARGO_TERM_COLOR: always - MSRV: '1.75' + MSRV: '1.78' on: push: diff --git a/Cargo.lock b/Cargo.lock index 0b394586..685b61ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -327,7 +327,6 @@ dependencies = [ "quickcheck", "quickcheck_macros", "reqwest 0.12.12", - "rustversion", "serde", "serde_json", "serde_path_to_error", diff --git a/Cargo.toml b/Cargo.toml index fe3bd728..f2110925 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ exclude = ["examples/async-graphql"] resolver = "2" [workspace.package] -rust-version = "1.75" +rust-version = "1.78" [workspace.lints.rust] unsafe_code = "forbid" diff --git a/axum-core/src/extract/mod.rs b/axum-core/src/extract/mod.rs index 18836442..366fc38e 100644 --- a/axum-core/src/extract/mod.rs +++ b/axum-core/src/extract/mod.rs @@ -47,11 +47,8 @@ mod private { /// See [`axum::extract`] for more general docs about extractors. /// /// [`axum::extract`]: https://docs.rs/axum/0.8/axum/extract/index.html -#[rustversion::attr( - since(1.78), - diagnostic::on_unimplemented( - note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.8/axum/extract/index.html` for details", - ) +#[diagnostic::on_unimplemented( + note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.8/axum/extract/index.html` for details" )] pub trait FromRequestParts: Sized { /// If the extractor fails it'll use this "rejection" type. A rejection is @@ -76,11 +73,8 @@ pub trait FromRequestParts: Sized { /// See [`axum::extract`] for more general docs about extractors. /// /// [`axum::extract`]: https://docs.rs/axum/0.8/axum/extract/index.html -#[rustversion::attr( - since(1.78), - diagnostic::on_unimplemented( - note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.8/axum/extract/index.html` for details", - ) +#[diagnostic::on_unimplemented( + note = "Function argument is not a valid axum extractor. \nSee `https://docs.rs/axum/0.8/axum/extract/index.html` for details" )] pub trait FromRequest: Sized { /// If the extractor fails it'll use this "rejection" type. A rejection is diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 69336457..5482cac9 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -62,7 +62,6 @@ memchr = "2.4.1" mime = "0.3.16" percent-encoding = "2.1" pin-project-lite = "0.2.7" -rustversion = "1.0.9" serde = "1.0" sync_wrapper = "1.0.0" tower = { version = "0.5.2", default-features = false, features = ["util"] } diff --git a/axum/README.md b/axum/README.md index 9d57939b..dedce62e 100644 --- a/axum/README.md +++ b/axum/README.md @@ -104,7 +104,7 @@ This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in ## Minimum supported Rust version -axum's MSRV is 1.75. +axum's MSRV is 1.78. ## Examples diff --git a/axum/src/handler/mod.rs b/axum/src/handler/mod.rs index 68c0032d..c7a02425 100644 --- a/axum/src/handler/mod.rs +++ b/axum/src/handler/mod.rs @@ -125,11 +125,8 @@ pub use self::service::HandlerService; /// ))); /// # let _: Router = app; /// ``` -#[rustversion::attr( - since(1.78), - diagnostic::on_unimplemented( - note = "Consider using `#[axum::debug_handler]` to improve the error message" - ) +#[diagnostic::on_unimplemented( + note = "Consider using `#[axum::debug_handler]` to improve the error message" )] pub trait Handler: Clone + Send + Sync + Sized + 'static { /// The type of future calling this handler returns. From f736e9f24eeb9f7ac7d5d15c23b5d06483455f87 Mon Sep 17 00:00:00 2001 From: Jan Runge Date: Fri, 1 Aug 2025 23:47:55 +0200 Subject: [PATCH 12/30] Extractors doc: correct linked example section (#3349) --- axum/src/docs/extract.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/axum/src/docs/extract.md b/axum/src/docs/extract.md index 41252172..ff0a37e4 100644 --- a/axum/src/docs/extract.md +++ b/axum/src/docs/extract.md @@ -269,9 +269,9 @@ If an extractor fails it will return a response with the error and your handler will not be called. To customize the error response you have two options: -1. Use `Result` as your extractor like shown in ["Optional - extractors"](#optional-extractors). This works well if you're only using - the extractor in a single handler. +1. Use `Result` as your extractor like shown in + ["Handling extractor rejections"](#handling-extractor-rejections). + This works well if you're only using the extractor in a single handler. 2. Create your own extractor that in its [`FromRequest`] implementation calls one of axum's built in extractors but returns a different response for rejections. See the [customize-extractor-error] example for more details. From d88b39897b449a6345b0ddccbf453fe9013f3d77 Mon Sep 17 00:00:00 2001 From: Glen De Cauwsemaecker Date: Wed, 13 Aug 2025 10:53:53 +0200 Subject: [PATCH 13/30] Fix ci failures (#3432) --- axum/src/lib.rs | 6 +++--- examples/error-handling/src/main.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/axum/src/lib.rs b/axum/src/lib.rs index c4d2a684..03301667 100644 --- a/axum/src/lib.rs +++ b/axum/src/lib.rs @@ -134,13 +134,13 @@ //! it is simple to convert errors into responses and you are guaranteed that //! all errors are handled. //! -//! See [`error_handling`](crate::error_handling) for more details on axum's +//! See [`error_handling`] for more details on axum's //! error handling model and how to handle errors gracefully. //! //! # Middleware //! //! There are several different ways to write middleware for axum. See -//! [`middleware`](crate::middleware) for more details. +//! [`middleware`] for more details. //! //! # Sharing state with handlers //! @@ -190,7 +190,7 @@ //! //! ## Using request extensions //! -//! Another way to share state with handlers is using [`Extension`](crate::extract::Extension) as +//! Another way to share state with handlers is using [`Extension`] as //! layer and extractor: //! //! ```rust,no_run diff --git a/examples/error-handling/src/main.rs b/examples/error-handling/src/main.rs index 0ad9f43c..3cbcd47c 100644 --- a/examples/error-handling/src/main.rs +++ b/examples/error-handling/src/main.rs @@ -212,7 +212,7 @@ mod time_library { static COUNTER: AtomicU64 = AtomicU64::new(0); // Fail on every third call just to simulate errors - if COUNTER.fetch_add(1, Ordering::SeqCst) % 3 == 0 { + if COUNTER.fetch_add(1, Ordering::SeqCst).is_multiple_of(3) { Err(Error::FailedToGetTime) } else { Ok(Self(1337)) From eb3c5418ef5a24b8c8a7d7257dd7bb9a3378de5f Mon Sep 17 00:00:00 2001 From: Glen De Cauwsemaecker Date: Wed, 13 Aug 2025 23:32:08 +0200 Subject: [PATCH 14/30] Support custom (binary) data to be written into SSE Event (#3425) --- axum/src/response/sse.rs | 229 +++++++++++++++++++++++---------------- 1 file changed, 135 insertions(+), 94 deletions(-) diff --git a/axum/src/response/sse.rs b/axum/src/response/sse.rs index 48c6a43e..9d49b864 100644 --- a/axum/src/response/sse.rs +++ b/axum/src/response/sse.rs @@ -38,7 +38,9 @@ use futures_util::stream::{Stream, TryStream}; use http_body::Frame; use pin_project_lite::pin_project; use std::{ - fmt, mem, + fmt::{self, Write as _}, + io::Write as _, + mem, pin::Pin, task::{ready, Context, Poll}, time::Duration, @@ -173,6 +175,27 @@ pub struct Event { flags: EventFlags, } +/// Expose [`Event`] as a [`std::fmt::Write`] +/// such that any form of data can be written as data safely. +/// +/// This also ensures that newline characters `\r` and `\n` +/// correctly trigger a split with a new `data: ` prefix. +/// +/// # Panics +/// +/// Panics if any `data` has already been written prior to the first write +/// of this [`EventDataWriter`] instance. +#[derive(Debug)] +#[must_use] +pub struct EventDataWriter { + event: Event, + + // Indicates if _this_ EventDataWriter has written data, + // this does not say anything about whether or not `event` contains + // data or not. + data_written: bool, +} + impl Event { /// Default keep-alive event pub const DEFAULT_KEEP_ALIVE: Self = Self::finalized(Bytes::from_static(b":\n\n")); @@ -184,6 +207,19 @@ impl Event { } } + /// Use this [`Event`] as a [`EventDataWriter`] to write custom data. + /// + /// - [`Self::data`] can be used as a shortcut to write `str` data + /// - [`Self::json_data`] can be used as a shortcut to write `json` data + /// + /// Turn it into an [`Event`] again using [`EventDataWriter::into_event`]. + pub fn into_data_writer(self) -> EventDataWriter { + EventDataWriter { + event: self, + data_written: false, + } + } + /// Set the event's data data field(s) (`data: `) /// /// Newlines in `data` will automatically be broken across `data: ` fields. @@ -194,25 +230,16 @@ impl Event { /// /// # Panics /// - /// - Panics if `data` contains any carriage returns, as they cannot be transmitted over SSE. - /// - Panics if `data` or `json_data` have already been called. + /// Panics if any `data` has already been written before. /// /// [`MessageEvent`'s data field]: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/data - pub fn data(mut self, data: T) -> Event + pub fn data(self, data: T) -> Self where T: AsRef, { - if self.flags.contains(EventFlags::HAS_DATA) { - panic!("Called `Event::data` multiple times"); - } - - for line in memchr_split(b'\n', data.as_ref().as_bytes()) { - self.field("data", line); - } - - self.flags.insert(EventFlags::HAS_DATA); - - self + let mut writer = self.into_data_writer(); + let _ = writer.write_str(data.as_ref()); + writer.into_event() } /// Set the event's data field to a value serialized as unformatted JSON (`data: `). @@ -221,43 +248,31 @@ impl Event { /// /// # Panics /// - /// Panics if `data` or `json_data` have already been called. + /// Panics if any `data` has already been written before. /// /// [`MessageEvent`'s data field]: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/data #[cfg(feature = "json")] - pub fn json_data(mut self, data: T) -> Result + pub fn json_data(self, data: T) -> Result where T: serde::Serialize, { - struct IgnoreNewLines<'a>(bytes::buf::Writer<&'a mut BytesMut>); - impl std::io::Write for IgnoreNewLines<'_> { + struct JsonWriter<'a>(&'a mut EventDataWriter); + impl std::io::Write for JsonWriter<'_> { + #[inline] fn write(&mut self, buf: &[u8]) -> std::io::Result { - let mut last_split = 0; - for delimiter in memchr::memchr2_iter(b'\n', b'\r', buf) { - self.0.write_all(&buf[last_split..delimiter])?; - last_split = delimiter + 1; - } - self.0.write_all(&buf[last_split..])?; - Ok(buf.len()) + Ok(self.0.write_buf(buf)) } - fn flush(&mut self) -> std::io::Result<()> { - self.0.flush() + Ok(()) } } - if self.flags.contains(EventFlags::HAS_DATA) { - panic!("Called `Event::json_data` multiple times"); - } - let buffer = self.buffer.as_mut(); - buffer.extend_from_slice(b"data: "); - serde_json::to_writer(IgnoreNewLines(buffer.writer()), &data) - .map_err(axum_core::Error::new)?; - buffer.put_u8(b'\n'); + let mut writer = self.into_data_writer(); - self.flags.insert(EventFlags::HAS_DATA); + let json_writer = JsonWriter(&mut writer); + serde_json::to_writer(json_writer, &data).map_err(axum_core::Error::new)?; - Ok(self) + Ok(writer.into_event()) } /// Set the event's comment field (`:`). @@ -406,6 +421,60 @@ impl Event { } } +impl EventDataWriter { + /// Consume the [`EventDataWriter`] and return the [`Event`] once again. + /// + /// In case any data was written by this instance + /// it will also write the trailing `\n` character. + pub fn into_event(self) -> Event { + let mut event = self.event; + if self.data_written { + let _ = event.buffer.as_mut().write_char('\n'); + } + event + } +} + +impl EventDataWriter { + // Assumption: underlying writer never returns an error: + // + fn write_buf(&mut self, buf: &[u8]) -> usize { + if buf.is_empty() { + return 0; + } + + let buffer = self.event.buffer.as_mut(); + + if !std::mem::replace(&mut self.data_written, true) { + if self.event.flags.contains(EventFlags::HAS_DATA) { + panic!("Called `Event::data*` multiple times"); + } + + let _ = buffer.write_str("data: "); + self.event.flags.insert(EventFlags::HAS_DATA); + } + + let mut writer = buffer.writer(); + + let mut last_split = 0; + for delimiter in memchr::memchr2_iter(b'\n', b'\r', buf) { + let _ = writer.write_all(&buf[last_split..=delimiter]); + let _ = writer.write_all(b"data: "); + last_split = delimiter + 1; + } + let _ = writer.write_all(&buf[last_split..]); + + buf.len() + } +} + +impl fmt::Write for EventDataWriter { + fn write_str(&mut self, s: &str) -> fmt::Result { + let _ = self.write_buf(s.as_bytes()); + Ok(()) + } +} + impl Default for Event { fn default() -> Self { Self { @@ -565,32 +634,6 @@ where } } -fn memchr_split(needle: u8, haystack: &[u8]) -> MemchrSplit<'_> { - MemchrSplit { - needle, - haystack: Some(haystack), - } -} - -struct MemchrSplit<'a> { - needle: u8, - haystack: Option<&'a [u8]>, -} - -impl<'a> Iterator for MemchrSplit<'a> { - type Item = &'a [u8]; - fn next(&mut self) -> Option { - let haystack = self.haystack?; - if let Some(pos) = memchr::memchr(self.needle, haystack) { - let (front, back) = haystack.split_at(pos); - self.haystack = Some(&back[1..]); - Some(front) - } else { - self.haystack.take() - } - } -} - #[cfg(test)] mod tests { use super::*; @@ -610,14 +653,40 @@ mod tests { } #[test] - fn valid_json_raw_value_chars_stripped() { + fn write_data_writer_str() { + // also confirm that nop writers do nothing :) + let mut writer = Event::default() + .into_data_writer() + .into_event() + .into_data_writer(); + writer.write_str("").unwrap(); + let mut writer = writer.into_event().into_data_writer(); + + writer.write_str("").unwrap(); + writer.write_str("moon ").unwrap(); + writer.write_str("star\nsun").unwrap(); + writer.write_str("").unwrap(); + writer.write_str("set").unwrap(); + writer.write_str("").unwrap(); + writer.write_str(" bye\r").unwrap(); + + let event = writer.into_event(); + + assert_eq!( + &*event.finalize(), + b"data: moon star\ndata: sunset bye\rdata: \n\n" + ); + } + + #[test] + fn valid_json_raw_value_chars_handled() { let json_string = "{\r\"foo\": \n\r\r \"bar\\n\"\n}"; let json_raw_value_event = Event::default() .json_data(serde_json::from_str::<&RawValue>(json_string).unwrap()) .unwrap(); assert_eq!( &*json_raw_value_event.finalize(), - format!("data: {}\n\n", json_string.replace(['\n', '\r'], "")).as_bytes() + b"data: {\rdata: \"foo\": \ndata: \rdata: \rdata: \"bar\\n\"\ndata: }\n\n" ); } @@ -762,32 +831,4 @@ mod tests { fields } - - #[test] - fn memchr_splitting() { - assert_eq!( - memchr_split(2, &[]).collect::>(), - [&[]] as [&[u8]; 1] - ); - assert_eq!( - memchr_split(2, &[2]).collect::>(), - [&[], &[]] as [&[u8]; 2] - ); - assert_eq!( - memchr_split(2, &[1]).collect::>(), - [&[1]] as [&[u8]; 1] - ); - assert_eq!( - memchr_split(2, &[1, 2]).collect::>(), - [&[1], &[]] as [&[u8]; 2] - ); - assert_eq!( - memchr_split(2, &[2, 1]).collect::>(), - [&[], &[1]] as [&[u8]; 2] - ); - assert_eq!( - memchr_split(2, &[1, 2, 2, 1]).collect::>(), - [&[1], &[], &[1]] as [&[u8]; 3] - ); - } } From b8ae30747c79416d330d92444fe2376b307523c7 Mon Sep 17 00:00:00 2001 From: reivilibre Date: Thu, 14 Aug 2025 10:10:52 +0100 Subject: [PATCH 15/30] Document type parameter `T` on `Handler` (#3435) Signed-off-by: Olivier 'reivilibre --- axum/src/handler/mod.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/axum/src/handler/mod.rs b/axum/src/handler/mod.rs index c7a02425..e99be5f8 100644 --- a/axum/src/handler/mod.rs +++ b/axum/src/handler/mod.rs @@ -125,6 +125,23 @@ pub use self::service::HandlerService; /// ))); /// # let _: Router = app; /// ``` +/// +/// # About type parameter `T` +/// +/// **Generally you shouldn't need to worry about `T`**; when calling methods such as +/// [`post`](crate::routing::method_routing::post) it will be automatically inferred and this is +/// the intended way for this parameter to be provided in application code. +/// +/// If you are implementing your own methods that accept implementations of `Handler` as +/// arguments, then the following may be useful: +/// +/// The type parameter `T` is a workaround for trait coherence rules, allowing us to +/// write blanket implementations of `Handler` over many types of handler functions +/// with different numbers of arguments, without the compiler forbidding us from doing +/// so because one type `F` can in theory implement both `Fn(A) -> X` and `Fn(A, B) -> Y`. +/// `T` is a placeholder taking on a representation of the parameters of the handler function, +/// as well as other similar 'coherence rule workaround' discriminators, +/// allowing us to select one function signature to use as a `Handler`. #[diagnostic::on_unimplemented( note = "Consider using `#[axum::debug_handler]` to improve the error message" )] From aa8f75111a90235cbf7dd4ac3d5fef2858ac83b5 Mon Sep 17 00:00:00 2001 From: Joel Uckelman Date: Mon, 8 Sep 2025 09:18:31 +0100 Subject: [PATCH 16/30] Add axum_extra::extract::Query::try_from_uri (#3460) `axum::extract::Query` has a try_from_uri, which is useful for testing. This adds the same function to `axum_extra::extract::Query`. --- axum-extra/src/extract/query.rs | 63 ++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/axum-extra/src/extract/query.rs b/axum-extra/src/extract/query.rs index 72bf2f47..93664b9e 100644 --- a/axum-extra/src/extract/query.rs +++ b/axum-extra/src/extract/query.rs @@ -1,7 +1,7 @@ use axum::extract::FromRequestParts; use axum_core::__composite_rejection as composite_rejection; use axum_core::__define_rejection as define_rejection; -use http::request::Parts; +use http::{request::Parts, Uri}; use serde::de::DeserializeOwned; /// Extractor that deserializes query strings into some type. @@ -95,6 +95,37 @@ where } } +impl Query +where + T: DeserializeOwned, +{ + /// Attempts to construct a [`Query`] from a reference to a [`Uri`]. + /// + /// # Example + /// ``` + /// use axum_extra::extract::Query; + /// use http::Uri; + /// use serde::Deserialize; + /// + /// #[derive(Deserialize)] + /// struct ExampleParams { + /// foo: String, + /// bar: u32, + /// } + /// + /// let uri: Uri = "http://example.com/path?foo=hello&bar=42".parse().unwrap(); + /// let result: Query = Query::try_from_uri(&uri).unwrap(); + /// assert_eq!(result.foo, String::from("hello")); + /// assert_eq!(result.bar, 42); + /// ``` + pub fn try_from_uri(value: &Uri) -> Result { + let query = value.query().unwrap_or_default(); + let params = + serde_html_form::from_str(query).map_err(FailedToDeserializeQueryString::from_err)?; + Ok(Self(params)) + } +} + axum_core::__impl_deref!(Query); define_rejection! { @@ -338,4 +369,34 @@ mod tests { assert_eq!(res.status(), StatusCode::BAD_REQUEST); } + + #[test] + fn test_try_from_uri() { + #[derive(Deserialize)] + struct TestQueryParams { + foo: Vec, + bar: u32, + } + let uri: Uri = "http://example.com/path?foo=hello&bar=42&foo=goodbye" + .parse() + .unwrap(); + let result: Query = Query::try_from_uri(&uri).unwrap(); + assert_eq!(result.foo, [String::from("hello"), String::from("goodbye")]); + assert_eq!(result.bar, 42); + } + + #[test] + fn test_try_from_uri_with_invalid_query() { + #[derive(Deserialize)] + struct TestQueryParams { + _foo: String, + _bar: u32, + } + let uri: Uri = "http://example.com/path?foo=hello&bar=invalid" + .parse() + .unwrap(); + let result: Result, _> = Query::try_from_uri(&uri); + + assert!(result.is_err()); + } } From c40f739cdf276bc3fb298351452eb28213577d0e Mon Sep 17 00:00:00 2001 From: Niclas Klugmann Date: Fri, 12 Sep 2025 09:21:19 +0200 Subject: [PATCH 17/30] Clarify that `AddExtension` is not the actual `Layer` (#3463) --- axum/src/extension.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/axum/src/extension.rs b/axum/src/extension.rs index da3b7b0d..75c8b456 100644 --- a/axum/src/extension.rs +++ b/axum/src/extension.rs @@ -157,6 +157,9 @@ where /// for more details. /// /// [request extensions]: https://docs.rs/http/latest/http/struct.Extensions.html +/// +/// If you need a layer to add an extension to every request, +/// use the [Layer](tower::Layer) implementation of [Extension]. #[derive(Clone, Copy, Debug)] pub struct AddExtension { pub(crate) inner: S, From 16534439f5c57f16de30d98b86f8e2bd3cf568db Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 14 Sep 2025 08:49:07 +0200 Subject: [PATCH 18/30] Switch serde dependency to serde_core (#3477) --- Cargo.lock | 22 ++++++++++++++----- axum-extra/Cargo.toml | 15 +++++++------ axum-extra/src/extract/form.rs | 2 +- axum-extra/src/extract/json_deserializer.rs | 2 +- axum-extra/src/extract/optional_path.rs | 2 +- axum-extra/src/extract/query.rs | 2 +- axum-extra/src/json_lines.rs | 8 +++---- axum-extra/src/response/erased_json.rs | 2 +- axum-extra/src/routing/typed.rs | 5 ++--- .../fail/json_not_deserialize.stderr | 16 +++++++------- .../typed_path/fail/not_deserialize.stderr | 20 ++++++++--------- axum/Cargo.toml | 13 +++++++---- axum/src/extract/path/de.rs | 2 +- axum/src/extract/path/mod.rs | 10 ++++----- axum/src/extract/query.rs | 2 +- axum/src/form.rs | 3 +-- axum/src/json.rs | 2 +- axum/src/response/sse.rs | 2 +- axum/src/test_helpers/test_client.rs | 4 ++-- 19 files changed, 75 insertions(+), 59 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 685b61ab..33801286 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -328,6 +328,7 @@ dependencies = [ "quickcheck_macros", "reqwest 0.12.12", "serde", + "serde_core", "serde_json", "serde_path_to_error", "serde_urlencoded", @@ -395,6 +396,7 @@ dependencies = [ "reqwest 0.12.12", "rustversion", "serde", + "serde_core", "serde_html_form", "serde_json", "serde_path_to_error", @@ -4375,10 +4377,11 @@ checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" [[package]] name = "serde" -version = "1.0.217" +version = "1.0.221" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +checksum = "341877e04a22458705eb4e131a1508483c877dca2792b3781d4e5d8a6019ec43" dependencies = [ + "serde_core", "serde_derive", ] @@ -4392,10 +4395,19 @@ dependencies = [ ] [[package]] -name = "serde_derive" -version = "1.0.217" +name = "serde_core" +version = "1.0.221" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +checksum = "0c459bc0a14c840cb403fc14b148620de1e0778c96ecd6e0c8c3cacb6d8d00fe" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.221" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6185cf75117e20e62b1ff867b9518577271e58abe0037c40bb4794969355ab0" dependencies = [ "proc-macro2", "quote", diff --git a/axum-extra/Cargo.toml b/axum-extra/Cargo.toml index 658e4442..6b5ff6e3 100644 --- a/axum-extra/Cargo.toml +++ b/axum-extra/Cargo.toml @@ -43,10 +43,8 @@ typed-header = ["dep:headers"] typed-routing = ["dep:axum-macros", "dep:percent-encoding", "dep:serde_html_form", "dep:form_urlencoded"] # Enabled by docs.rs because it uses all-features -__private_docs = [ - # Required for the ErasedJson docs to be able to link to axum::Json - "axum/json", -] +# Enables upstream things linked to in docs +__private_docs = ["axum/json", "dep:serde"] [dependencies] axum = { path = "../axum", version = "0.8.4", default-features = false, features = ["original-uri"] } @@ -59,7 +57,7 @@ http-body-util = "0.1.0" mime = "0.3" pin-project-lite = "0.2" rustversion = "1.0.9" -serde = "1.0" +serde_core = "1.0.221" tower = { version = "0.5.2", default-features = false, features = ["util"] } tower-layer = "0.3" tower-service = "0.3" @@ -82,12 +80,15 @@ tokio-util = { version = "0.7", optional = true } tracing = { version = "0.1.37", default-features = false, optional = true } typed-json = { version = "0.1.1", optional = true } +# doc dependencies +serde = { version = "1.0.221", optional = true } + [dev-dependencies] axum = { path = "../axum", features = ["macros", "__private"] } axum-macros = { path = "../axum-macros", features = ["__private"] } hyper = "1.0.0" reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "multipart"] } -serde = { version = "1.0", features = ["derive"] } +serde = { version = "1.0.221", features = ["derive"] } serde_json = "1.0.71" tokio = { version = "1.14", features = ["full"] } tower = { version = "0.5.2", features = ["util"] } @@ -115,7 +116,7 @@ allowed = [ "http_body", "pin_project_lite", "prost", - "serde", + "serde_core", "tokio", "tokio_util", "tower_layer", diff --git a/axum-extra/src/extract/form.rs b/axum-extra/src/extract/form.rs index 454c50a7..717d0a18 100644 --- a/axum-extra/src/extract/form.rs +++ b/axum-extra/src/extract/form.rs @@ -5,7 +5,7 @@ use axum::{ }; use axum_core::__composite_rejection as composite_rejection; use axum_core::__define_rejection as define_rejection; -use serde::de::DeserializeOwned; +use serde_core::de::DeserializeOwned; /// Extractor that deserializes `application/x-www-form-urlencoded` requests /// into some type. diff --git a/axum-extra/src/extract/json_deserializer.rs b/axum-extra/src/extract/json_deserializer.rs index 051ab0f1..6ad11ed9 100644 --- a/axum-extra/src/extract/json_deserializer.rs +++ b/axum-extra/src/extract/json_deserializer.rs @@ -4,7 +4,7 @@ use axum_core::__define_rejection as define_rejection; use axum_core::extract::rejection::BytesRejection; use bytes::Bytes; use http::{header, HeaderMap}; -use serde::Deserialize; +use serde_core::Deserialize; use std::marker::PhantomData; /// JSON Extractor for zero-copy deserialization. diff --git a/axum-extra/src/extract/optional_path.rs b/axum-extra/src/extract/optional_path.rs index 466944ff..2b4cd6d5 100644 --- a/axum-extra/src/extract/optional_path.rs +++ b/axum-extra/src/extract/optional_path.rs @@ -2,7 +2,7 @@ use axum::{ extract::{rejection::PathRejection, FromRequestParts, Path}, RequestPartsExt, }; -use serde::de::DeserializeOwned; +use serde_core::de::DeserializeOwned; /// Extractor that extracts path arguments the same way as [`Path`], except if there aren't any. /// diff --git a/axum-extra/src/extract/query.rs b/axum-extra/src/extract/query.rs index 93664b9e..08249598 100644 --- a/axum-extra/src/extract/query.rs +++ b/axum-extra/src/extract/query.rs @@ -2,7 +2,7 @@ use axum::extract::FromRequestParts; use axum_core::__composite_rejection as composite_rejection; use axum_core::__define_rejection as define_rejection; use http::{request::Parts, Uri}; -use serde::de::DeserializeOwned; +use serde_core::de::DeserializeOwned; /// Extractor that deserializes query strings into some type. /// diff --git a/axum-extra/src/json_lines.rs b/axum-extra/src/json_lines.rs index 38ac735d..281e1763 100644 --- a/axum-extra/src/json_lines.rs +++ b/axum-extra/src/json_lines.rs @@ -9,7 +9,7 @@ use axum::{ use bytes::{BufMut, BytesMut}; use futures_util::stream::{BoxStream, Stream, TryStream, TryStreamExt}; use pin_project_lite::pin_project; -use serde::{de::DeserializeOwned, Serialize}; +use serde_core::{de::DeserializeOwned, Serialize}; use std::{ convert::Infallible, io::{self, Write}, @@ -173,7 +173,7 @@ where #[cfg(test)] mod tests { - use super::*; + use super::JsonLines; use crate::test_helpers::*; use axum::{ routing::{get, post}, @@ -181,8 +181,8 @@ mod tests { }; use futures_util::StreamExt; use http::StatusCode; - use serde::Deserialize; - use std::error::Error; + use serde::{Deserialize, Serialize}; + use std::{convert::Infallible, error::Error}; #[derive(Serialize, Deserialize, PartialEq, Eq, Debug)] struct User { diff --git a/axum-extra/src/response/erased_json.rs b/axum-extra/src/response/erased_json.rs index 5088ff35..de0fc221 100644 --- a/axum-extra/src/response/erased_json.rs +++ b/axum-extra/src/response/erased_json.rs @@ -5,7 +5,7 @@ use axum::{ response::{IntoResponse, Response}, }; use bytes::{BufMut, Bytes, BytesMut}; -use serde::Serialize; +use serde_core::Serialize; /// A response type that holds a JSON in serialized form. /// diff --git a/axum-extra/src/routing/typed.rs b/axum-extra/src/routing/typed.rs index eccdfb19..f45ef053 100644 --- a/axum-extra/src/routing/typed.rs +++ b/axum-extra/src/routing/typed.rs @@ -2,7 +2,7 @@ use std::{any::type_name, fmt}; use super::sealed::Sealed; use http::Uri; -use serde::Serialize; +use serde_core::Serialize; /// A type safe path. /// @@ -384,7 +384,6 @@ impl_second_element_is!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, #[cfg(test)] mod tests { - use super::*; use crate::{ extract::WithRejection, routing::{RouterExt, TypedPath}, @@ -394,7 +393,7 @@ mod tests { response::{IntoResponse, Response}, Router, }; - use serde::Deserialize; + use serde::{Deserialize, Serialize}; #[derive(TypedPath, Deserialize)] #[typed_path("/users/{id}")] diff --git a/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr b/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr index afda86b6..a4b0cf95 100644 --- a/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr +++ b/axum-macros/tests/debug_handler/fail/json_not_deserialize.stderr @@ -1,12 +1,12 @@ -error[E0277]: the trait bound `for<'de> Struct: serde::de::Deserialize<'de>` is not satisfied +error[E0277]: the trait bound `Struct: serde::Deserialize<'de>` is not satisfied --> tests/debug_handler/fail/json_not_deserialize.rs:7:24 | 7 | async fn handler(_foo: Json) {} - | ^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `Struct`, which is required by `Json: FromRequest<()>` + | ^^^^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `Struct`, which is required by `Json: FromRequest<()>` | = note: for local types consider adding `#[derive(serde::Deserialize)]` to your `Struct` type = note: for types from other crates check whether the crate offers a `serde` feature flag - = help: the following other types implement trait `serde::de::Deserialize<'de>`: + = help: the following other types implement trait `serde_core::de::Deserialize<'de>`: &'a [u8] &'a serde_json::raw::RawValue &'a std::path::Path @@ -16,7 +16,7 @@ error[E0277]: the trait bound `for<'de> Struct: serde::de::Deserialize<'de>` is (T0, T1) (T0, T1, T2) and $N others - = note: required for `Struct` to implement `serde::de::DeserializeOwned` + = note: required for `Struct` to implement `serde_core::de::DeserializeOwned` = note: required for `Json` to implement `FromRequest<()>` = help: see issue #48214 help: add `#![feature(trivial_bounds)]` to the crate attributes to enable @@ -24,15 +24,15 @@ help: add `#![feature(trivial_bounds)]` to the crate attributes to enable 1 + #![feature(trivial_bounds)] | -error[E0277]: the trait bound `for<'de> Struct: serde::de::Deserialize<'de>` is not satisfied +error[E0277]: the trait bound `Struct: serde::Deserialize<'de>` is not satisfied --> tests/debug_handler/fail/json_not_deserialize.rs:7:24 | 7 | async fn handler(_foo: Json) {} - | ^^^^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `Struct`, which is required by `Json: FromRequest<()>` + | ^^^^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `Struct`, which is required by `Json: FromRequest<()>` | = note: for local types consider adding `#[derive(serde::Deserialize)]` to your `Struct` type = note: for types from other crates check whether the crate offers a `serde` feature flag - = help: the following other types implement trait `serde::de::Deserialize<'de>`: + = help: the following other types implement trait `serde_core::de::Deserialize<'de>`: &'a [u8] &'a serde_json::raw::RawValue &'a std::path::Path @@ -42,7 +42,7 @@ error[E0277]: the trait bound `for<'de> Struct: serde::de::Deserialize<'de>` is (T0, T1) (T0, T1, T2) and $N others - = note: required for `Struct` to implement `serde::de::DeserializeOwned` + = note: required for `Struct` to implement `serde_core::de::DeserializeOwned` = note: required for `Json` to implement `FromRequest<()>` note: required by a bound in `__axum_macros_check_handler_0_from_request_check` --> tests/debug_handler/fail/json_not_deserialize.rs:7:24 diff --git a/axum-macros/tests/typed_path/fail/not_deserialize.stderr b/axum-macros/tests/typed_path/fail/not_deserialize.stderr index ed2c9d75..4534b19e 100644 --- a/axum-macros/tests/typed_path/fail/not_deserialize.stderr +++ b/axum-macros/tests/typed_path/fail/not_deserialize.stderr @@ -1,12 +1,12 @@ -error[E0277]: the trait bound `for<'de> MyPath: serde::de::Deserialize<'de>` is not satisfied +error[E0277]: the trait bound `MyPath: serde::Deserialize<'de>` is not satisfied --> tests/typed_path/fail/not_deserialize.rs:3:10 | 3 | #[derive(TypedPath)] - | ^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `MyPath`, which is required by `axum::extract::Path: FromRequestParts` + | ^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `MyPath`, which is required by `axum::extract::Path: FromRequestParts` | = note: for local types consider adding `#[derive(serde::Deserialize)]` to your `MyPath` type = note: for types from other crates check whether the crate offers a `serde` feature flag - = help: the following other types implement trait `serde::de::Deserialize<'de>`: + = help: the following other types implement trait `serde_core::de::Deserialize<'de>`: &'a [u8] &'a serde_json::raw::RawValue &'a std::path::Path @@ -16,16 +16,16 @@ error[E0277]: the trait bound `for<'de> MyPath: serde::de::Deserialize<'de>` is (T0, T1) (T0, T1, T2) and $N others - = note: required for `MyPath` to implement `serde::de::DeserializeOwned` + = note: required for `MyPath` to implement `serde_core::de::DeserializeOwned` = note: required for `axum::extract::Path` to implement `FromRequestParts` error[E0277]: the trait bound `MyPath: serde::de::DeserializeOwned` is not satisfied --> tests/typed_path/fail/not_deserialize.rs:3:10 | 3 | #[derive(TypedPath)] - | ^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `MyPath`, which is required by `axum::extract::Path: FromRequestParts` + | ^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `MyPath`, which is required by `axum::extract::Path: FromRequestParts` | - = help: the following other types implement trait `serde::de::Deserialize<'de>`: + = help: the following other types implement trait `serde_core::de::Deserialize<'de>`: &'a [u8] &'a serde_json::raw::RawValue &'a std::path::Path @@ -35,16 +35,16 @@ error[E0277]: the trait bound `MyPath: serde::de::DeserializeOwned` is not satis (T0, T1) (T0, T1, T2) and $N others - = note: required for `MyPath` to implement `serde::de::DeserializeOwned` + = note: required for `MyPath` to implement `serde_core::de::DeserializeOwned` = note: required for `axum::extract::Path` to implement `FromRequestParts` error[E0277]: the trait bound `MyPath: serde::de::DeserializeOwned` is not satisfied --> tests/typed_path/fail/not_deserialize.rs:3:10 | 3 | #[derive(TypedPath)] - | ^^^^^^^^^ the trait `for<'de> serde::de::Deserialize<'de>` is not implemented for `MyPath`, which is required by `axum::extract::Path: FromRequestParts` + | ^^^^^^^^^ the trait `for<'de> serde_core::de::Deserialize<'de>` is not implemented for `MyPath`, which is required by `axum::extract::Path: FromRequestParts` | - = help: the following other types implement trait `serde::de::Deserialize<'de>`: + = help: the following other types implement trait `serde_core::de::Deserialize<'de>`: &'a [u8] &'a serde_json::raw::RawValue &'a std::path::Path @@ -54,6 +54,6 @@ error[E0277]: the trait bound `MyPath: serde::de::DeserializeOwned` is not satis (T0, T1) (T0, T1, T2) and $N others - = note: required for `MyPath` to implement `serde::de::DeserializeOwned` + = note: required for `MyPath` to implement `serde_core::de::DeserializeOwned` = note: required for `axum::extract::Path` to implement `FromRequestParts` = note: this error originates in the derive macro `TypedPath` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 5482cac9..6583f53f 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -42,7 +42,9 @@ __private_docs = [ # but they need the same sort of treatment as below to be complete "axum-core/__private_docs", # Enables upstream things linked to in docs - "tower/full", "dep:tower-http", + "tower/full", + "dep:serde", + "dep:tower-http", ] # This feature is used to enable private test helper usage @@ -62,7 +64,7 @@ memchr = "2.4.1" mime = "0.3.16" percent-encoding = "2.1" pin-project-lite = "0.2.7" -serde = "1.0" +serde_core = "1.0.221" sync_wrapper = "1.0.0" tower = { version = "0.5.2", default-features = false, features = ["util"] } tower-layer = "0.3.2" @@ -84,6 +86,9 @@ tokio = { package = "tokio", version = "1.44", features = ["time"], optional = t tokio-tungstenite = { version = "0.27.0", optional = true } tracing = { version = "0.1", default-features = false, optional = true } +# doc dependencies +serde = { version = "1.0.211", optional = true } + [dependencies.tower-http] version = "0.6.0" optional = true @@ -127,7 +132,7 @@ hyper = { version = "1.1.0", features = ["client"] } quickcheck = "1.0" quickcheck_macros = "1.0" reqwest = { version = "0.12", default-features = false, features = ["json", "stream", "multipart"] } -serde = { version = "1.0", features = ["derive"] } +serde = { version = "1.0.221", features = ["derive"] } serde_json = { version = "1.0", features = ["raw_value"] } time = { version = "0.3", features = ["serde-human-readable"] } tokio = { package = "tokio", version = "1.44.2", features = ["macros", "rt", "rt-multi-thread", "net", "test-util"] } @@ -216,7 +221,7 @@ allowed = [ "bytes", "http", "http_body", - "serde", + "serde_core", "tokio", # for the `__private` feature diff --git a/axum/src/extract/path/de.rs b/axum/src/extract/path/de.rs index ca78bb9e..2dfd7f44 100644 --- a/axum/src/extract/path/de.rs +++ b/axum/src/extract/path/de.rs @@ -1,6 +1,6 @@ use super::{ErrorKind, PathDeserializationError}; use crate::util::PercentDecodedStr; -use serde::{ +use serde_core::{ de::{self, DeserializeSeed, EnumAccess, Error, MapAccess, SeqAccess, VariantAccess, Visitor}, forward_to_deserialize_any, Deserializer, }; diff --git a/axum/src/extract/path/mod.rs b/axum/src/extract/path/mod.rs index a03ddc0d..205c55fa 100644 --- a/axum/src/extract/path/mod.rs +++ b/axum/src/extract/path/mod.rs @@ -14,7 +14,7 @@ use axum_core::{ RequestPartsExt as _, }; use http::{request::Parts, StatusCode}; -use serde::de::DeserializeOwned; +use serde_core::de::DeserializeOwned; use std::{fmt, sync::Arc}; /// Extractor that will get captures from the URL and parse them using @@ -254,7 +254,7 @@ impl WrongNumberOfParameters { } } -impl serde::de::Error for PathDeserializationError { +impl serde_core::de::Error for PathDeserializationError { #[inline] fn custom(msg: T) -> Self where @@ -710,7 +710,7 @@ mod tests { async fn captures_match_empty_inner_segments() { let app = Router::new().route( "/{key}/method", - get(|Path(param): Path| async move { param.to_string() }), + get(|Path(param): Path| async move { param.clone() }), ); let client = TestClient::new(app); @@ -726,7 +726,7 @@ mod tests { async fn captures_match_empty_inner_segments_near_end() { let app = Router::new().route( "/method/{key}/", - get(|Path(param): Path| async move { param.to_string() }), + get(|Path(param): Path| async move { param.clone() }), ); let client = TestClient::new(app); @@ -745,7 +745,7 @@ mod tests { async fn captures_match_empty_trailing_segment() { let app = Router::new().route( "/method/{key}", - get(|Path(param): Path| async move { param.to_string() }), + get(|Path(param): Path| async move { param.clone() }), ); let client = TestClient::new(app); diff --git a/axum/src/extract/query.rs b/axum/src/extract/query.rs index 58b7d366..6fe81099 100644 --- a/axum/src/extract/query.rs +++ b/axum/src/extract/query.rs @@ -1,6 +1,6 @@ use super::{rejection::*, FromRequestParts}; use http::{request::Parts, Uri}; -use serde::de::DeserializeOwned; +use serde_core::de::DeserializeOwned; /// Extractor that deserializes query strings into some type. /// diff --git a/axum/src/form.rs b/axum/src/form.rs index dabfb653..ab692a64 100644 --- a/axum/src/form.rs +++ b/axum/src/form.rs @@ -4,8 +4,7 @@ use axum_core::response::{IntoResponse, Response}; use axum_core::RequestExt; use http::header::CONTENT_TYPE; use http::StatusCode; -use serde::de::DeserializeOwned; -use serde::Serialize; +use serde_core::{de::DeserializeOwned, Serialize}; /// URL encoded extractor and response. /// diff --git a/axum/src/json.rs b/axum/src/json.rs index c62c94c6..c8c9b60b 100644 --- a/axum/src/json.rs +++ b/axum/src/json.rs @@ -7,7 +7,7 @@ use http::{ header::{self, HeaderMap, HeaderValue}, StatusCode, }; -use serde::{de::DeserializeOwned, Serialize}; +use serde_core::{de::DeserializeOwned, Serialize}; /// JSON Extractor / Response. /// diff --git a/axum/src/response/sse.rs b/axum/src/response/sse.rs index 9d49b864..d8455baf 100644 --- a/axum/src/response/sse.rs +++ b/axum/src/response/sse.rs @@ -254,7 +254,7 @@ impl Event { #[cfg(feature = "json")] pub fn json_data(self, data: T) -> Result where - T: serde::Serialize, + T: serde_core::Serialize, { struct JsonWriter<'a>(&'a mut EventDataWriter); impl std::io::Write for JsonWriter<'_> { diff --git a/axum/src/test_helpers/test_client.rs b/axum/src/test_helpers/test_client.rs index c5e74877..e0d57834 100644 --- a/axum/src/test_helpers/test_client.rs +++ b/axum/src/test_helpers/test_client.rs @@ -102,7 +102,7 @@ impl RequestBuilder { pub fn json(mut self, json: &T) -> Self where - T: serde::Serialize, + T: serde_core::Serialize, { self.builder = self.builder.json(json); self @@ -165,7 +165,7 @@ impl TestResponse { #[allow(dead_code)] pub async fn json(self) -> T where - T: serde::de::DeserializeOwned, + T: serde_core::de::DeserializeOwned, { self.response.json().await.unwrap() } From d108c50ce7f94eccc8e22d181d0f08d60ec183dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ml=C3=A1dek?= Date: Fri, 12 Sep 2025 14:33:10 +0200 Subject: [PATCH 19/30] axum: add `ResponseAxumBodyLayer` for mapping response body to `axum::body::Body` --- axum/src/middleware/mod.rs | 4 ++ axum/src/middleware/response_axum_body.rs | 76 +++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 axum/src/middleware/response_axum_body.rs diff --git a/axum/src/middleware/mod.rs b/axum/src/middleware/mod.rs index 22dab143..41b7671c 100644 --- a/axum/src/middleware/mod.rs +++ b/axum/src/middleware/mod.rs @@ -6,6 +6,7 @@ mod from_extractor; mod from_fn; mod map_request; mod map_response; +mod response_axum_body; pub use self::from_extractor::{ from_extractor, from_extractor_with_state, FromExtractor, FromExtractorLayer, @@ -17,6 +18,9 @@ pub use self::map_request::{ pub use self::map_response::{ map_response, map_response_with_state, MapResponse, MapResponseLayer, }; +pub use self::response_axum_body::{ + ResponseAxumBody, ResponseAxumBodyFuture, ResponseAxumBodyLayer, +}; pub use crate::extension::AddExtension; pub mod future { diff --git a/axum/src/middleware/response_axum_body.rs b/axum/src/middleware/response_axum_body.rs new file mode 100644 index 00000000..786cb4d9 --- /dev/null +++ b/axum/src/middleware/response_axum_body.rs @@ -0,0 +1,76 @@ +use std::{ + error::Error, + future::Future, + pin::Pin, + task::{ready, Context, Poll}, +}; + +use axum_core::{body::Body, response::Response}; +use bytes::Bytes; +use http_body::Body as HttpBody; +use pin_project_lite::pin_project; +use tower::{Layer, Service}; + +/// Layer that transforms the Response body to [`crate::body::Body`]. +/// +/// This is useful when another layer maps the body to some other type to convert it back. +#[derive(Debug, Clone)] +pub struct ResponseAxumBodyLayer; + +impl Layer for ResponseAxumBodyLayer { + type Service = ResponseAxumBody; + + fn layer(&self, inner: S) -> Self::Service { + ResponseAxumBody::(inner) + } +} + +/// Service generated by [`ResponseAxumBodyLayer`]. +#[derive(Debug, Clone)] +pub struct ResponseAxumBody(S); + +impl Service for ResponseAxumBody +where + S: Service>, + ResBody: HttpBody + Send + 'static, + ::Error: Error + Send + Sync, +{ + type Response = Response; + + type Error = S::Error; + + type Future = ResponseAxumBodyFuture; + + fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + self.0.poll_ready(cx) + } + + fn call(&mut self, req: Request) -> Self::Future { + ResponseAxumBodyFuture { + inner: self.0.call(req), + } + } +} + +pin_project! { + /// Response future for [`ResponseAxumBody`]. + pub struct ResponseAxumBodyFuture { + #[pin] + inner: Fut, + } +} + +impl Future for ResponseAxumBodyFuture +where + Fut: Future, E>>, + ResBody: HttpBody + Send + 'static, + ::Error: Error + Send + Sync, +{ + type Output = Result, E>; + + fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + let this = self.project(); + let res = ready!(this.inner.poll(cx)?); + Poll::Ready(Ok(res.map(Body::new))) + } +} From 221ef3795b154d8b0d094be5a8a5468773592a74 Mon Sep 17 00:00:00 2001 From: Loic Hausammann Date: Tue, 16 Sep 2025 17:54:44 +0200 Subject: [PATCH 20/30] websocket: add a wrapper around is_terminated (#3443) Co-authored-by: Loic Co-authored-by: loikki <851651-loikki@users.noreply.gitlab.com> --- axum/src/extract/ws.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/axum/src/extract/ws.rs b/axum/src/extract/ws.rs index 5ac3f622..4e23273a 100644 --- a/axum/src/extract/ws.rs +++ b/axum/src/extract/ws.rs @@ -96,7 +96,7 @@ use crate::{body::Bytes, response::Response, Error}; use axum_core::body::Body; use futures_util::{ sink::{Sink, SinkExt}, - stream::{Stream, StreamExt}, + stream::{FusedStream, Stream, StreamExt}, }; use http::{ header::{self, HeaderMap, HeaderName, HeaderValue}, @@ -533,6 +533,13 @@ impl WebSocket { } } +impl FusedStream for WebSocket { + /// Returns true if the websocket has been terminated. + fn is_terminated(&self) -> bool { + self.inner.is_terminated() + } +} + impl Stream for WebSocket { type Item = Result; From 6f1ed5e0a025cd3214e4b0232b0a79fffd339af9 Mon Sep 17 00:00:00 2001 From: Fredrik Park Date: Tue, 16 Sep 2025 22:33:39 +0200 Subject: [PATCH 21/30] Spelling misstake in Using closure capture (#3481) --- axum/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axum/src/lib.rs b/axum/src/lib.rs index 03301667..b5d754e1 100644 --- a/axum/src/lib.rs +++ b/axum/src/lib.rs @@ -275,7 +275,7 @@ //! # let _: Router = app; //! ``` //! -//! The downside to this approach is that it's a the most verbose approach. +//! The downside to this approach is that it's the most verbose approach. //! //! ## Using task-local variables //! From 0c664934747cc5fad928825c556169da9192a470 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sun, 21 Sep 2025 05:57:04 +0900 Subject: [PATCH 22/30] axum-extra: Remove unused tower dependency (#3486) --- axum-extra/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/axum-extra/Cargo.toml b/axum-extra/Cargo.toml index 6b5ff6e3..03ae4f02 100644 --- a/axum-extra/Cargo.toml +++ b/axum-extra/Cargo.toml @@ -44,7 +44,7 @@ typed-routing = ["dep:axum-macros", "dep:percent-encoding", "dep:serde_html_form # Enabled by docs.rs because it uses all-features # Enables upstream things linked to in docs -__private_docs = ["axum/json", "dep:serde"] +__private_docs = ["axum/json", "dep:serde", "dep:tower"] [dependencies] axum = { path = "../axum", version = "0.8.4", default-features = false, features = ["original-uri"] } @@ -58,7 +58,6 @@ mime = "0.3" pin-project-lite = "0.2" rustversion = "1.0.9" serde_core = "1.0.221" -tower = { version = "0.5.2", default-features = false, features = ["util"] } tower-layer = "0.3" tower-service = "0.3" @@ -82,6 +81,7 @@ typed-json = { version = "0.1.1", optional = true } # doc dependencies serde = { version = "1.0.221", optional = true } +tower = { version = "0.5.2", default-features = false, features = ["util"], optional = true } [dev-dependencies] axum = { path = "../axum", features = ["macros", "__private"] } From cb8670a94b93ae2d860e6f8a6bdc09ae7b79fb2e Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 25 Sep 2025 22:09:35 +0900 Subject: [PATCH 23/30] Update to tokio-tungstenite 0.28 (#3497) --- Cargo.lock | 8 ++++---- axum/Cargo.toml | 4 ++-- examples/testing-websockets/Cargo.toml | 2 +- examples/websockets/Cargo.toml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 33801286..6d36be77 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5239,9 +5239,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "489a59b6730eda1b0171fcfda8b121f4bee2b35cba8645ca35c5f7ba3eb736c1" +checksum = "d25a406cddcc431a75d3d9afc6a7c0f7428d4891dd973e4d54c56b46127bf857" dependencies = [ "futures-util", "log", @@ -5499,9 +5499,9 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.27.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d" +checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" dependencies = [ "bytes", "data-encoding", diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 6583f53f..5d6d4e9d 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -83,7 +83,7 @@ serde_path_to_error = { version = "0.1.8", optional = true } serde_urlencoded = { version = "0.7", optional = true } sha1 = { version = "0.10", optional = true } tokio = { package = "tokio", version = "1.44", features = ["time"], optional = true } -tokio-tungstenite = { version = "0.27.0", optional = true } +tokio-tungstenite = { version = "0.28.0", optional = true } tracing = { version = "0.1", default-features = false, optional = true } # doc dependencies @@ -137,7 +137,7 @@ serde_json = { version = "1.0", features = ["raw_value"] } time = { version = "0.3", features = ["serde-human-readable"] } tokio = { package = "tokio", version = "1.44.2", features = ["macros", "rt", "rt-multi-thread", "net", "test-util"] } tokio-stream = "0.1" -tokio-tungstenite = "0.27.0" +tokio-tungstenite = "0.28.0" tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["json"] } uuid = { version = "1.0", features = ["serde", "v4"] } diff --git a/examples/testing-websockets/Cargo.toml b/examples/testing-websockets/Cargo.toml index b7bb17c3..04233dc9 100644 --- a/examples/testing-websockets/Cargo.toml +++ b/examples/testing-websockets/Cargo.toml @@ -8,4 +8,4 @@ publish = false axum = { path = "../../axum", features = ["ws"] } futures = "0.3" tokio = { version = "1.0", features = ["full"] } -tokio-tungstenite = "0.27" +tokio-tungstenite = "0.28" diff --git a/examples/websockets/Cargo.toml b/examples/websockets/Cargo.toml index ef75c353..4b30908d 100644 --- a/examples/websockets/Cargo.toml +++ b/examples/websockets/Cargo.toml @@ -11,7 +11,7 @@ futures = "0.3" futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] } headers = "0.4" tokio = { version = "1.0", features = ["full"] } -tokio-tungstenite = "0.27.0" +tokio-tungstenite = "0.28.0" tower-http = { version = "0.6.1", features = ["fs", "trace"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } From 1a7460cd27c45c2475c6b7cb33d83ef6e9f12b39 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 28 Sep 2025 19:32:40 +0200 Subject: [PATCH 24/30] ci: Also run for release branches --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fa9d8b5c..3eb2c281 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -7,7 +7,8 @@ env: on: push: branches: - - main + - main + - v0.* pull_request: {} jobs: From 6529158354fd98d7bd981264f91e7e64edcc732b Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 28 Sep 2025 19:36:51 +0200 Subject: [PATCH 25/30] Bump Cargo.lock --- Cargo.lock | 2260 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 1298 insertions(+), 962 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d36be77..ec7022f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.24.2" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ "gimli", ] [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "aead" @@ -33,7 +33,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "cipher", "cpufeatures", ] @@ -54,12 +54,12 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ - "cfg-if 1.0.0", - "getrandom 0.2.15", + "cfg-if 1.0.3", + "getrandom 0.3.3", "once_cell", "version_check", "zerocopy", @@ -95,12 +95,6 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -112,9 +106,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.95" +version = "1.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "arc-swap" @@ -160,7 +154,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -190,18 +184,15 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.18" +version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df895a515f70646414f4b45c0b79082783b80552b373a68283012928df56f522" +checksum = "5a89bce6054c720275ac2432fbba080a66a2106a44a1b804553930ca6909f4e0" dependencies = [ - "brotli 7.0.0", - "flate2", + "compression-codecs", + "compression-core", "futures-core", - "memchr", "pin-project-lite", "tokio", - "zstd", - "zstd-safe", ] [[package]] @@ -236,13 +227,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.83" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -271,33 +262,32 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-lc-rs" -version = "1.12.0" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f409eb70b561706bf8abba8ca9c112729c481595893fd06a2dd9af8ed8441148" +checksum = "879b6c89592deb404ba4dc0ae6b58ffd1795c78991cbb5b8bc441c48a070440d" dependencies = [ "aws-lc-sys", - "paste", "zeroize", ] [[package]] name = "aws-lc-sys" -version = "0.24.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "923ded50f602b3007e5e63e3f094c479d9c8a9b42d7f4034e4afe456aa48bfd2" +checksum = "1ba2e2516bdf37af57fc6ff047855f54abad0066e5c4fdaaeb76dabb2e05bcf5" dependencies = [ "bindgen", "cc", "cmake", "dunce", "fs_extra", - "paste", + "libloading", ] [[package]] @@ -312,10 +302,10 @@ dependencies = [ "bytes", "form_urlencoded", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.5.2", + "hyper 1.7.0", "hyper-util", "itoa", "matchit", @@ -326,7 +316,7 @@ dependencies = [ "pin-project-lite", "quickcheck", "quickcheck_macros", - "reqwest 0.12.12", + "reqwest 0.12.23", "serde", "serde_core", "serde_json", @@ -339,7 +329,7 @@ dependencies = [ "tokio-stream", "tokio-tungstenite", "tower 0.5.2", - "tower-http 0.6.2", + "tower-http 0.6.6", "tower-layer", "tower-service", "tracing", @@ -356,16 +346,16 @@ dependencies = [ "axum-macros", "bytes", "futures-core", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.5.2", + "hyper 1.7.0", "mime", "pin-project-lite", "rustversion", "sync_wrapper 1.0.2", "tokio", - "tower-http 0.6.2", + "tower-http 0.6.6", "tower-layer", "tower-service", "tracing", @@ -384,16 +374,16 @@ dependencies = [ "form_urlencoded", "futures-util", "headers", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.5.2", + "hyper 1.7.0", "mime", "multer", "percent-encoding", "pin-project-lite", "prost", - "reqwest 0.12.12", + "reqwest 0.12.23", "rustversion", "serde", "serde_core", @@ -404,7 +394,7 @@ dependencies = [ "tokio-stream", "tokio-util", "tower 0.5.2", - "tower-http 0.6.2", + "tower-http 0.6.6", "tower-layer", "tower-service", "tracing", @@ -423,7 +413,7 @@ dependencies = [ "rustversion", "serde", "serde_json", - "syn 2.0.93", + "syn 2.0.106", "tokio", "trybuild", ] @@ -437,10 +427,10 @@ dependencies = [ "arc-swap", "bytes", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.5.2", + "hyper 1.7.0", "hyper-util", "pin-project-lite", "rustls 0.21.12", @@ -453,41 +443,39 @@ dependencies = [ [[package]] name = "axum-server" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56bac90848f6a9393ac03c63c640925c4b7c8ca21654de40d53f55964667c7d8" +checksum = "495c05f60d6df0093e8fb6e74aa5846a0ad06abaf96d76166283720bf740f8ab" dependencies = [ "arc-swap", "bytes", - "futures-util", - "http 1.2.0", + "fs-err", + "http 1.3.1", "http-body 1.0.1", - "http-body-util", - "hyper 1.5.2", + "hyper 1.7.0", "hyper-util", "pin-project-lite", - "rustls 0.23.20", + "rustls 0.23.32", "rustls-pemfile 2.2.0", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.1", - "tower 0.4.13", + "tokio-rustls 0.26.4", "tower-service", ] [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" dependencies = [ "addr2line", - "cfg-if 1.0.0", + "cfg-if 1.0.3", "libc", "miniz_oxide", "object", "rustc-demangle", - "windows-targets 0.52.6", + "windows-link 0.2.0", ] [[package]] @@ -510,15 +498,15 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" [[package]] name = "basic-toml" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823388e228f614e9558c6804262db37960ec8821856535f5c3f59913140558f8" +checksum = "ba62675e8242a4c4e806d12f11d136e626e6c8361d6b829310732241652a178a" dependencies = [ "serde", ] @@ -579,25 +567,22 @@ dependencies = [ [[package]] name = "bindgen" -version = "0.69.5" +version = "0.72.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088" +checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.4", "cexpr", "clang-sys", - "itertools 0.12.1", - "lazy_static", - "lazycell", + "itertools 0.13.0", "log", "prettyplease", "proc-macro2", "quote", "regex", - "rustc-hash 1.1.0", + "rustc-hash", "shlex", - "syn 2.0.93", - "which", + "syn 2.0.106", ] [[package]] @@ -608,9 +593,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" dependencies = [ "serde", ] @@ -668,25 +653,35 @@ checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", - "brotli-decompressor", + "brotli-decompressor 4.0.3", ] [[package]] name = "brotli" -version = "7.0.0" +version = "8.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" +checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", - "brotli-decompressor", + "brotli-decompressor 5.0.0", ] [[package]] name = "brotli-decompressor" -version = "4.0.1" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" +checksum = "a334ef7c9e23abf0ce748e8cd309037da93e606ad52eb372e4ce327a0dcfbdfd" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -694,18 +689,20 @@ dependencies = [ [[package]] name = "bson" -version = "2.13.0" +version = "2.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068208f2b6fcfa27a7f1ee37488d2bb8ba2640f68f5475d08e1d9130696aba59" +checksum = "7969a9ba84b0ff843813e7249eed1678d9b6607ce5a3b8f0a47af3fcf7978e6e" dependencies = [ "ahash", - "base64 0.13.1", + "base64 0.22.1", "bitvec", + "getrandom 0.2.16", + "getrandom 0.3.3", "hex", - "indexmap 2.7.0", + "indexmap 2.11.4", "js-sys", "once_cell", - "rand 0.8.5", + "rand 0.9.2", "serde", "serde_bytes", "serde_json", @@ -715,9 +712,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "byteorder" @@ -727,16 +724,17 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.9.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" [[package]] name = "cc" -version = "1.2.6" +version = "1.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6dbb628b8f8555f86d0323c2eb39e3ec81901f4b83e091db8a6a76d316a333" +checksum = "e1354349954c6fc9cb0deab020f27f783cf0b604e8bb754dc4658ecf0d29c35f" dependencies = [ + "find-msvc-tools", "jobserver", "libc", "shlex", @@ -759,9 +757,9 @@ checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "cfg_aliases" @@ -771,17 +769,16 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.39" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-link 0.2.0", ] [[package]] @@ -807,9 +804,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.52" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c682c223677e0e5b6b7f63a64b9351844c3f1b1678a68b7ee617e30fb082620e" +checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" dependencies = [ "cc", ] @@ -828,6 +825,26 @@ dependencies = [ "tokio-util", ] +[[package]] +name = "compression-codecs" +version = "0.4.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef8a506ec4b81c460798f572caead636d57d3d7e940f998160f52bd254bf2d23" +dependencies = [ + "brotli 8.0.2", + "compression-core", + "flate2", + "memchr", + "zstd", + "zstd-safe", +] + +[[package]] +name = "compression-core" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e47641d3deaf41fb1538ac1f54735925e275eaf3bf4d55c81b137fba797e5cbb" + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -843,6 +860,26 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom 0.2.16", + "once_cell", + "tiny-keccak", +] + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -867,7 +904,7 @@ dependencies = [ "hmac 0.12.1", "percent-encoding", "rand 0.8.5", - "sha2 0.10.8", + "sha2 0.10.9", "subtle", "time", "version_check", @@ -891,18 +928,18 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] [[package]] name = "crc" -version = "3.2.1" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" dependencies = [ "crc-catalog", ] @@ -915,11 +952,11 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", ] [[package]] @@ -946,6 +983,12 @@ version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" +[[package]] +name = "crunchy" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" + [[package]] name = "crypto-common" version = "0.1.6" @@ -988,52 +1031,88 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.10" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.20.11", + "darling_macro 0.20.11", +] + +[[package]] +name = "darling" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" +dependencies = [ + "darling_core 0.21.3", + "darling_macro 0.21.3", ] [[package]] name = "darling_core" -version = "0.20.10" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.93", + "syn 2.0.106", +] + +[[package]] +name = "darling_core" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.106", ] [[package]] name = "darling_macro" -version = "0.20.10" +version = "0.20.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ - "darling_core", + "darling_core 0.20.11", "quote", - "syn 2.0.93", + "syn 2.0.106", +] + +[[package]] +name = "darling_macro" +version = "0.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" +dependencies = [ + "darling_core 0.21.3", + "quote", + "syn 2.0.106", ] [[package]] name = "data-encoding" -version = "2.6.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" [[package]] name = "deadpool" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6541a3916932fe57768d4be0b1ffb5ec7cbf74ca8c903fdfd5c0fe8aa958f0ed" +checksum = "0be2b1d1d6ec8d846f05e137292d0b89133caf95ef33695424c09568bdd39b1b" dependencies = [ "deadpool-runtime", + "lazy_static", "num_cpus", "tokio", ] @@ -1069,9 +1148,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ "const-oid", "pem-rfc7468", @@ -1080,45 +1159,56 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.11" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071" dependencies = [ "powerfmt", - "serde", + "serde_core", +] + +[[package]] +name = "derive-syn-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] name = "derive-where" -version = "1.2.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" +checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "derive_more" -version = "0.99.18" +version = "0.99.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "diesel" -version = "2.2.6" +version = "2.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf1bedf64cdb9643204a36dd15b19a6ce8e7aa7f7b105868e9f1fad5ffa7d12" +checksum = "229850a212cd9b84d4f0290ad9d294afc0ae70fccaa8949dbe8b43ffafa1e20c" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.4", "byteorder", "diesel_derives", "itoa", @@ -1142,15 +1232,15 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.2.3" +version = "2.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f2c3de51e2ba6bf2a648285696137aaf0f5f487bcbea93972fe8a364e131a4" +checksum = "1b96984c469425cb577bf6f17121ecb3e4fe1e81de5d8f780dd372802858d756" dependencies = [ "diesel_table_macro_syntax", "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -1170,7 +1260,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -1202,7 +1292,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -1213,16 +1303,16 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dsl_auto_type" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" +checksum = "139ae9aca7527f85f26dd76483eb38533fd84bd571065da1739656ef71c5ff5b" dependencies = [ - "darling", + "darling 0.20.11", "either", "heck", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -1232,10 +1322,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] -name = "either" -version = "1.13.0" +name = "dyn-clone" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" dependencies = [ "serde", ] @@ -1246,7 +1342,7 @@ version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", ] [[package]] @@ -1258,7 +1354,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -1273,18 +1369,18 @@ dependencies = [ [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.10" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -1293,7 +1389,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "home", "windows-sys 0.48.0", ] @@ -1306,9 +1402,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "5.3.1" +version = "5.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue", "parking", @@ -1356,11 +1452,11 @@ dependencies = [ "axum", "brotli 6.0.0", "flate2", - "http 1.2.0", + "http 1.3.1", "serde_json", "tokio", "tower 0.5.2", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", "zstd", @@ -1383,7 +1479,7 @@ version = "0.1.0" dependencies = [ "axum", "tokio", - "tower-http 0.6.2", + "tower-http 0.6.6", ] [[package]] @@ -1458,7 +1554,7 @@ dependencies = [ "axum", "serde", "tokio", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", ] @@ -1493,7 +1589,7 @@ version = "0.1.0" dependencies = [ "axum", "tokio", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing-subscriber", ] @@ -1503,7 +1599,7 @@ version = "0.1.0" dependencies = [ "axum", "http-body-util", - "hyper 1.5.2", + "hyper 1.7.0", "tokio", "tower 0.5.2", ] @@ -1521,7 +1617,7 @@ name = "example-http-proxy" version = "0.1.0" dependencies = [ "axum", - "hyper 1.5.2", + "hyper 1.7.0", "hyper-util", "tokio", "tower 0.5.2", @@ -1550,7 +1646,7 @@ dependencies = [ "axum", "tokio", "tower 0.5.2", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", ] @@ -1561,7 +1657,7 @@ version = "0.1.0" dependencies = [ "axum", "futures-util", - "hyper 1.5.2", + "hyper 1.7.0", "hyper-util", "tokio", "tokio-native-tls", @@ -1576,7 +1672,7 @@ version = "0.1.0" dependencies = [ "axum", "futures-util", - "hyper 1.5.2", + "hyper 1.7.0", "hyper-util", "openssl", "tokio", @@ -1592,10 +1688,10 @@ version = "0.1.0" dependencies = [ "axum", "futures-util", - "hyper 1.5.2", + "hyper 1.7.0", "hyper-util", "tokio", - "tokio-rustls 0.26.1", + "tokio-rustls 0.26.4", "tower-service", "tracing", "tracing-subscriber", @@ -1609,7 +1705,7 @@ dependencies = [ "mongodb", "serde", "tokio", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", ] @@ -1620,7 +1716,7 @@ version = "0.1.0" dependencies = [ "axum", "tokio", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", ] @@ -1633,9 +1729,9 @@ dependencies = [ "async-session", "axum", "axum-extra", - "http 1.2.0", + "http 1.3.1", "oauth2", - "reqwest 0.12.12", + "reqwest 0.12.23", "serde", "tokio", "tracing", @@ -1715,10 +1811,10 @@ name = "example-reqwest-response" version = "0.1.0" dependencies = [ "axum", - "reqwest 0.12.12", + "reqwest 0.12.23", "tokio", "tokio-stream", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", ] @@ -1728,7 +1824,7 @@ name = "example-reverse-proxy" version = "0.1.0" dependencies = [ "axum", - "hyper 1.5.2", + "hyper 1.7.0", "hyper-util", "tokio", ] @@ -1746,7 +1842,7 @@ name = "example-serve-with-hyper" version = "0.1.0" dependencies = [ "axum", - "hyper 1.5.2", + "hyper 1.7.0", "hyper-util", "tokio", "tower 0.5.2", @@ -1759,7 +1855,7 @@ dependencies = [ "axum", "axum-extra", "futures-executor", - "http 1.2.0", + "http 1.3.1", "tower-service", ] @@ -1783,11 +1879,11 @@ dependencies = [ "eventsource-stream", "futures", "headers", - "reqwest 0.12.12", + "reqwest 0.12.23", "reqwest-eventsource", "tokio", "tokio-stream", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", ] @@ -1799,7 +1895,7 @@ dependencies = [ "axum", "tokio", "tower 0.5.2", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", ] @@ -1849,7 +1945,7 @@ dependencies = [ "serde_json", "tokio", "tower 0.5.2", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", ] @@ -1870,7 +1966,7 @@ version = "0.1.0" dependencies = [ "axum", "axum-extra", - "axum-server 0.7.1", + "axum-server 0.7.2", "tokio", "tracing", "tracing-subscriber", @@ -1882,7 +1978,7 @@ version = "0.1.0" dependencies = [ "axum", "axum-extra", - "axum-server 0.7.1", + "axum-server 0.7.2", "tokio", "tracing", "tracing-subscriber", @@ -1896,7 +1992,7 @@ dependencies = [ "serde", "tokio", "tower 0.5.2", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", "uuid", @@ -1934,7 +2030,7 @@ version = "0.1.0" dependencies = [ "axum", "tokio", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", ] @@ -1945,7 +2041,7 @@ version = "0.1.0" dependencies = [ "axum", "http-body-util", - "hyper 1.5.2", + "hyper 1.7.0", "hyper-util", "tokio", "tracing-subscriber", @@ -1989,7 +2085,7 @@ dependencies = [ "headers", "tokio", "tokio-tungstenite", - "tower-http 0.6.2", + "tower-http 0.6.6", "tracing", "tracing-subscriber", ] @@ -2019,10 +2115,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] -name = "flate2" -version = "1.0.35" +name = "find-msvc-tools" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959" + +[[package]] +name = "flate2" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" dependencies = [ "crc32fast", "miniz_oxide", @@ -2045,6 +2147,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -2062,13 +2170,23 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] +[[package]] +name = "fs-err" +version = "3.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44f150ffc8782f35521cec2b23727707cb4045706ba3c854e86bef66b3a8cdbd" +dependencies = [ + "autocfg", + "tokio", +] + [[package]] name = "fs_extra" version = "1.3.0" @@ -2148,7 +2266,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -2199,14 +2317,14 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "wasm-bindgen", ] @@ -2216,10 +2334,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", + "js-sys", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasi 0.14.7+wasi-0.2.4", + "wasm-bindgen", ] [[package]] @@ -2234,21 +2354,21 @@ dependencies = [ [[package]] name = "gimli" -version = "0.31.1" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" [[package]] name = "glob" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "h2" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "0beca50380b1fc32983fc1cb4587bfa4bb9e78fc259aad4a0032d2080309222d" dependencies = [ "bytes", "fnv", @@ -2256,7 +2376,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.7.0", + "indexmap 2.11.4", "slab", "tokio", "tokio-util", @@ -2265,17 +2385,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.7" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.2.0", - "indexmap 2.7.0", + "http 1.3.1", + "indexmap 2.11.4", "slab", "tokio", "tokio-util", @@ -2295,22 +2415,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ "ahash", - "allocator-api2", ] [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" [[package]] name = "hashlink" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.5", ] [[package]] @@ -2325,14 +2455,14 @@ dependencies = [ [[package]] name = "headers" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9" +checksum = "b3314d5adb5d94bcdf56771f2e50dbbc80bb4bdf88967526706205ac9eff24eb" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bytes", "headers-core", - "http 1.2.0", + "http 1.3.1", "httpdate", "mime", "sha1", @@ -2344,7 +2474,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http 1.2.0", + "http 1.3.1", ] [[package]] @@ -2355,9 +2485,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.9" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "hex" @@ -2367,18 +2497,18 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hickory-proto" -version = "0.24.2" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447afdcdb8afb9d0a852af6dc65d9b285ce720ed7a59e42a8bf2e931c67bc1b5" +checksum = "92652067c9ce6f66ce53cc38d1169daa36e6e7eb7dd3b63b5103bd9d97117248" dependencies = [ "async-trait", - "cfg-if 1.0.0", + "cfg-if 1.0.3", "data-encoding", "enum-as-inner", "futures-channel", "futures-io", "futures-util", - "idna 1.0.3", + "idna 1.1.0", "ipnet", "once_cell", "rand 0.8.5", @@ -2391,11 +2521,11 @@ dependencies = [ [[package]] name = "hickory-resolver" -version = "0.24.2" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2e2aba9c389ce5267d31cf1e4dace82390ae276b0b364ea55630b1fa1b44b4" +checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "futures-util", "hickory-proto", "ipconfig", @@ -2447,17 +2577,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi", -] - [[package]] name = "http" version = "0.2.12" @@ -2471,9 +2590,9 @@ dependencies = [ [[package]] name = "http" -version = "1.2.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ "bytes", "fnv", @@ -2498,7 +2617,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.2.0", + "http 1.3.1", ] [[package]] @@ -2509,7 +2628,7 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "pin-project-lite", ] @@ -2522,9 +2641,9 @@ checksum = "9171a2ea8a68358193d15dd5d70c1c10a2afc3e7e4c5bc92bc9f025cebd7359c" [[package]] name = "httparse" -version = "1.9.5" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" @@ -2551,14 +2670,14 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.26", + "h2 0.3.27", "http 0.2.12", "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.5.10", "tokio", "tower-service", "tracing", @@ -2567,20 +2686,22 @@ dependencies = [ [[package]] name = "hyper" -version = "1.5.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", - "h2 0.4.7", - "http 1.2.0", + "futures-core", + "h2 0.4.12", + "http 1.3.1", "http-body 1.0.1", "httparse", "httpdate", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", @@ -2602,20 +2723,19 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.5" +version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "futures-util", - "http 1.2.0", - "hyper 1.5.2", + "http 1.3.1", + "hyper 1.7.0", "hyper-util", - "rustls 0.23.20", + "rustls 0.23.32", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.1", + "tokio-rustls 0.26.4", "tower-service", - "webpki-roots 0.26.7", + "webpki-roots 1.0.2", ] [[package]] @@ -2626,7 +2746,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.5.2", + "hyper 1.7.0", "hyper-util", "native-tls", "tokio", @@ -2636,33 +2756,41 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.10" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" dependencies = [ + "base64 0.22.1", "bytes", "futures-channel", + "futures-core", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", - "hyper 1.5.2", + "hyper 1.7.0", + "ipnet", + "libc", + "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.0", + "system-configuration 0.6.1", "tokio", "tower-service", "tracing", + "windows-registry", ] [[package]] name = "iana-time-zone" -version = "0.1.61" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" +checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", + "log", "wasm-bindgen", "windows-core", ] @@ -2678,21 +2806,22 @@ dependencies = [ [[package]] name = "icu_collections" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" dependencies = [ "displaydoc", + "potential_utf", "yoke", "zerofrom", "zerovec", ] [[package]] -name = "icu_locid" -version = "1.5.0" +name = "icu_locale_core" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" dependencies = [ "displaydoc", "litemap", @@ -2701,31 +2830,11 @@ dependencies = [ "zerovec", ] -[[package]] -name = "icu_locid_transform" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" -dependencies = [ - "displaydoc", - "icu_locid", - "icu_locid_transform_data", - "icu_provider", - "tinystr", - "zerovec", -] - -[[package]] -name = "icu_locid_transform_data" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" - [[package]] name = "icu_normalizer" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" dependencies = [ "displaydoc", "icu_collections", @@ -2733,67 +2842,54 @@ dependencies = [ "icu_properties", "icu_provider", "smallvec", - "utf16_iter", - "utf8_iter", - "write16", "zerovec", ] [[package]] name = "icu_normalizer_data" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" [[package]] name = "icu_properties" -version = "1.5.1" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" dependencies = [ "displaydoc", "icu_collections", - "icu_locid_transform", + "icu_locale_core", "icu_properties_data", "icu_provider", - "tinystr", + "potential_utf", + "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "1.5.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" [[package]] name = "icu_provider" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" dependencies = [ "displaydoc", - "icu_locid", - "icu_provider_macros", + "icu_locale_core", "stable_deref_trait", "tinystr", "writeable", "yoke", "zerofrom", + "zerotrie", "zerovec", ] -[[package]] -name = "icu_provider_macros" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.93", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -2812,9 +2908,9 @@ dependencies = [ [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -2823,9 +2919,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" dependencies = [ "icu_normalizer", "icu_properties", @@ -2844,31 +2940,43 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.0" +version = "2.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown 0.16.0", "serde", + "serde_core", ] [[package]] name = "inout" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ "generic-array", ] +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags 2.9.4", + "cfg-if 1.0.3", + "libc", +] + [[package]] name = "ipconfig" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2", + "socket2 0.5.10", "widestring", "windows-sys 0.48.0", "winreg", @@ -2876,29 +2984,20 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.1" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "iri-string" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0f0a572e8ffe56e2ff4f769f32ffe919282c3916799f8b68688b6030063bea" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" dependencies = [ "memchr", "serde", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -2909,25 +3008,35 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "1.0.14" +name = "itertools" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jobserver" -version = "0.1.32" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ + "getrandom 0.3.3", "libc", ] [[package]] name = "js-sys" -version = "0.3.76" +version = "0.3.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" dependencies = [ "once_cell", "wasm-bindgen", @@ -2935,11 +3044,11 @@ dependencies = [ [[package]] name = "jsonwebtoken" -version = "9.3.0" +version = "9.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" +checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "js-sys", "pem", "ring", @@ -2957,33 +3066,38 @@ dependencies = [ "spin", ] -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "libc" -version = "0.2.169" +version = "0.2.176" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" +checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174" [[package]] name = "libloading" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" dependencies = [ - "cfg-if 1.0.0", - "windows-targets 0.52.6", + "cfg-if 1.0.3", + "windows-targets 0.53.4", ] [[package]] name = "libm" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +dependencies = [ + "bitflags 2.9.4", + "libc", + "redox_syscall", +] [[package]] name = "libsqlite3-sys" @@ -2991,7 +3105,6 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ - "cc", "pkg-config", "vcpkg", ] @@ -3004,15 +3117,15 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "listenfd" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0500463acd96259d219abb05dc57e5a076ef04b2db9a2112846929b5f174c96" +checksum = "b87bc54a4629b4294d0b3ef041b64c40c611097a677d9dc07b2c67739fe39dba" dependencies = [ "libc", "uuid", @@ -3021,15 +3134,15 @@ dependencies = [ [[package]] name = "litemap" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" [[package]] name = "lock_api" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" dependencies = [ "autocfg", "scopeguard", @@ -3037,9 +3150,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "lru-cache" @@ -3051,18 +3164,66 @@ dependencies = [ ] [[package]] -name = "match_cfg" -version = "0.1.0" +name = "lru-slab" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "macro_magic" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc33f9f0351468d26fbc53d9ce00a096c8522ecb42f19b50f34f2c422f76d21d" +dependencies = [ + "macro_magic_core", + "macro_magic_macros", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "macro_magic_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1687dc887e42f352865a393acae7cf79d98fab6351cde1f58e9e057da89bf150" +dependencies = [ + "const-random", + "derive-syn-parse", + "macro_magic_core_macros", + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "macro_magic_core_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b02abfe41815b5bd98dbd4260173db2c116dda171dc0fe7838cb206333b83308" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "macro_magic_macros" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ea28ee64b88876bf45277ed9a5817c1817df061a74f2b988971a12570e5869" +dependencies = [ + "macro_magic_core", + "quote", + "syn 2.0.106", +] [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -3077,21 +3238,21 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "digest 0.10.7", ] [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "metrics" -version = "0.23.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884adb57038347dfbaf2d5065887b6cf4312330dc8e94bc30a1a839bd79d3261" +checksum = "3045b4193fbdc5b5681f32f11070da9be3609f189a79f3390706d42587f46bb5" dependencies = [ "ahash", "portable-atomic", @@ -3104,7 +3265,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4f0c8427b39666bf970460908b213ec09b3b350f20c0c2eabcbba51704a08e6" dependencies = [ "base64 0.22.1", - "indexmap 2.7.0", + "indexmap 2.11.4", "metrics", "metrics-util", "quanta", @@ -3128,9 +3289,9 @@ dependencies = [ [[package]] name = "migrations_internals" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" +checksum = "3bda1634d70d5bd53553cf15dca9842a396e8c799982a3ad22998dc44d961f24" dependencies = [ "serde", "toml", @@ -3165,9 +3326,9 @@ dependencies = [ [[package]] name = "minijinja" -version = "2.5.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c37e1b517d1dcd0e51dc36c4567b9d5a29262b3ec8da6cb5d35e27a8fb529b5" +checksum = "a9f264d75233323f4b7d2f03aefe8a990690cdebfbfe26ea86bcbaec5e9ac990" dependencies = [ "serde", ] @@ -3180,29 +3341,47 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.2" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", ] [[package]] name = "mio" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", ] [[package]] -name = "mongodb" -version = "3.1.1" +name = "mongocrypt" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1f6edf7fe8828429647a2200f684681ca6d5a33b45edc3140c81390d852301" +checksum = "22426d6318d19c5c0773f783f85375265d6a8f0fa76a733da8dc4355516ec63d" +dependencies = [ + "bson", + "mongocrypt-sys", + "once_cell", + "serde", +] + +[[package]] +name = "mongocrypt-sys" +version = "0.1.4+1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dda42df21d035f88030aad8e877492fac814680e1d7336a57b2a091b989ae388" + +[[package]] +name = "mongodb" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622f272c59e54a3c85f5902c6b8e7b1653a6b6681f45e4c42d6581301119a4b8" dependencies = [ "async-trait", "base64 0.13.1", @@ -3219,42 +3398,45 @@ dependencies = [ "hickory-proto", "hickory-resolver", "hmac 0.12.1", + "macro_magic", "md-5", + "mongocrypt", "mongodb-internal-macros", "once_cell", "pbkdf2", "percent-encoding", "rand 0.8.5", "rustc_version_runtime", - "rustls 0.21.12", - "rustls-pemfile 1.0.4", + "rustls 0.23.32", + "rustversion", "serde", "serde_bytes", "serde_with", - "sha-1", - "sha2 0.10.8", - "socket2", + "sha1", + "sha2 0.10.9", + "socket2 0.5.10", "stringprep", "strsim", "take_mut", "thiserror 1.0.69", "tokio", - "tokio-rustls 0.24.1", + "tokio-rustls 0.26.4", "tokio-util", "typed-builder", "uuid", - "webpki-roots 0.25.4", + "webpki-roots 0.26.11", ] [[package]] name = "mongodb-internal-macros" -version = "3.1.1" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b07bfd601af78e39384707a8e80041946c98260e3e0190e294ee7435823e6bf" +checksum = "63981427a0f26b89632fd2574280e069d09fb2912a3138da15de0174d11dd077" dependencies = [ + "macro_magic", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -3266,7 +3448,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http 1.2.0", + "http 1.3.1", "httparse", "memchr", "mime", @@ -3276,9 +3458,9 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" dependencies = [ "libc", "log", @@ -3303,12 +3485,11 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" dependencies = [ - "overload", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -3376,9 +3557,9 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +checksum = "91df4bbde75afed763b708b7eee1e8e7651e02d97f6d5dd763e89367e957b23b" dependencies = [ "hermit-abi", "libc", @@ -3392,32 +3573,32 @@ checksum = "c38841cdd844847e3e7c8d29cef9dcfed8877f8f56f9071f77843ecf3baf937f" dependencies = [ "base64 0.13.1", "chrono", - "getrandom 0.2.15", + "getrandom 0.2.16", "http 0.2.12", "rand 0.8.5", "reqwest 0.11.27", "serde", "serde_json", "serde_path_to_error", - "sha2 0.10.8", + "sha2 0.10.9", "thiserror 1.0.69", "url", ] [[package]] name = "object" -version = "0.36.7" +version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.20.2" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "opaque-debug" @@ -3427,12 +3608,12 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.68" +version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.6.0", - "cfg-if 1.0.0", + "bitflags 2.9.4", + "cfg-if 1.0.3", "foreign-types", "libc", "once_cell", @@ -3448,20 +3629,20 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.104" +version = "0.9.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" dependencies = [ "cc", "libc", @@ -3469,12 +3650,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "parking" version = "2.2.1" @@ -3483,9 +3658,9 @@ checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" dependencies = [ "lock_api", "parking_lot_core", @@ -3493,23 +3668,17 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "libc", "redox_syscall", "smallvec", "windows-targets 0.52.6", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "pbkdf2" version = "0.11.0" @@ -3521,9 +3690,9 @@ dependencies = [ [[package]] name = "pem" -version = "3.0.4" +version = "3.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +checksum = "38af38e8470ac9dee3ce1bae1af9c1671fffc44ddfd8bd1d0a3445bf349a8ef3" dependencies = [ "base64 0.22.1", "serde", @@ -3540,53 +3709,54 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "phf" -version = "0.11.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" dependencies = [ "phf_shared", + "serde", ] [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" dependencies = [ "siphasher", ] [[package]] name = "pin-project" -version = "1.1.7" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.7" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "pin-project-lite" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -3617,9 +3787,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "polyval" @@ -3627,7 +3797,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "cpufeatures", "opaque-debug", "universal-hash", @@ -3635,15 +3805,15 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.10.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] name = "postgres-protocol" -version = "0.6.7" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acda0ebdebc28befa84bee35e651e4c5f09073d668c7aed4cf7e23c3cda84b23" +checksum = "fbef655056b916eb868048276cfd5d6a7dea4f81560dfd047f97c8c6fe3fcfd4" dependencies = [ "base64 0.22.1", "byteorder", @@ -3652,22 +3822,31 @@ dependencies = [ "hmac 0.12.1", "md-5", "memchr", - "rand 0.8.5", - "sha2 0.10.8", + "rand 0.9.2", + "sha2 0.10.9", "stringprep", ] [[package]] name = "postgres-types" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66ea23a2d0e5734297357705193335e0a957696f34bed2f2faefacb2fec336f" +checksum = "77a120daaabfcb0e324d5bf6e411e9222994cb3795c79943a0ef28ed27ea76e4" dependencies = [ "bytes", "fallible-iterator", "postgres-protocol", ] +[[package]] +name = "potential_utf" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +dependencies = [ + "zerovec", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -3676,30 +3855,31 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ "zerocopy", ] [[package]] name = "pq-sys" -version = "0.6.3" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6cc05d7ea95200187117196eee9edd0644424911821aeb28a18ce60ea0b8793" +checksum = "dfd6cf44cca8f9624bc19df234fc4112873432f5fda1caff174527846d026fa9" dependencies = [ + "libc", "vcpkg", ] [[package]] name = "prettyplease" -version = "0.2.25" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -3728,18 +3908,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] [[package]] name = "prost" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c0fef6c4230e4ccf618a35c59d7ede15dea37de8427500f50aff708806e42ec" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" dependencies = [ "bytes", "prost-derive", @@ -3747,38 +3927,32 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.4" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "157c5a9d7ea5c2ed2d9fb8f495b64759f7816c7eaea54ba3978f0d63000162e3" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.13.0", + "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "quanta" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773ce68d0bb9bc7ef20be3536ffe94e223e1f365bd374108b2659fac0c65cfe6" +checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7" dependencies = [ "crossbeam-utils", "libc", "once_cell", "raw-cpuid", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", "web-sys", "winapi", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - [[package]] name = "quickcheck" version = "1.0.3" @@ -3792,48 +3966,51 @@ dependencies = [ [[package]] name = "quickcheck_macros" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22a693222d716a9587786f37ac3f6b4faedb5b80c23914e7303ff5a1d8016e9" +checksum = "f71ee38b42f8459a88d3362be6f9b841ad2d5421844f61eb1c59c11bff3ac14a" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.106", ] [[package]] name = "quinn" -version = "0.11.6" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" dependencies = [ "bytes", + "cfg_aliases", "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.1.0", - "rustls 0.23.20", - "socket2", - "thiserror 2.0.9", + "rustc-hash", + "rustls 0.23.32", + "socket2 0.6.0", + "thiserror 2.0.16", "tokio", "tracing", + "web-time", ] [[package]] name = "quinn-proto" -version = "0.11.9" +version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" dependencies = [ "bytes", - "getrandom 0.2.15", - "rand 0.8.5", + "getrandom 0.3.3", + "lru-slab", + "rand 0.9.2", "ring", - "rustc-hash 2.1.0", - "rustls 0.23.20", + "rustc-hash", + "rustls 0.23.32", "rustls-pki-types", "slab", - "thiserror 2.0.9", + "thiserror 2.0.16", "tinyvec", "tracing", "web-time", @@ -3841,23 +4018,23 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.9" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.6.0", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "quote" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] @@ -3887,9 +4064,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -3921,7 +4098,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", ] [[package]] @@ -3935,11 +4112,11 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.2.0" +version = "11.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.4", ] [[package]] @@ -3960,7 +4137,7 @@ dependencies = [ "pin-project-lite", "ryu", "sha1_smol", - "socket2", + "socket2 0.5.10", "tokio", "tokio-util", "url", @@ -3968,56 +4145,61 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.8" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.4", +] + +[[package]] +name = "ref-cast" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", ] [[package]] name = "regex" -version = "1.11.1" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", + "regex-automata", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.1.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "reqwest" @@ -4030,7 +4212,7 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.26", + "h2 0.3.27", "http 0.2.12", "http-body 0.4.6", "hyper 0.14.32", @@ -4062,54 +4244,50 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.12" +version = "0.12.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb" dependencies = [ "base64 0.22.1", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.4.7", - "http 1.2.0", + "h2 0.4.12", + "http 1.3.1", "http-body 1.0.1", "http-body-util", - "hyper 1.5.2", - "hyper-rustls 0.27.5", + "hyper 1.7.0", + "hyper-rustls 0.27.7", "hyper-tls", "hyper-util", - "ipnet", "js-sys", "log", "mime", "mime_guess", "native-tls", - "once_cell", "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.20", - "rustls-pemfile 2.2.0", + "rustls 0.23.32", "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper 1.0.2", - "system-configuration 0.6.1", "tokio", "tokio-native-tls", - "tokio-rustls 0.26.1", + "tokio-rustls 0.26.4", "tokio-util", "tower 0.5.2", + "tower-http 0.6.6", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 0.26.7", - "windows-registry", + "webpki-roots 1.0.2", ] [[package]] @@ -4124,40 +4302,35 @@ dependencies = [ "mime", "nom", "pin-project-lite", - "reqwest 0.12.12", + "reqwest 0.12.23", "thiserror 1.0.69", ] [[package]] name = "resolv-conf" -version = "0.7.0" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" -dependencies = [ - "hostname", - "quick-error", -] +checksum = "6b3789b30bd25ba102de4beabd95d21ac45b69b1be7d14522bab988c526d6799" [[package]] name = "ring" -version = "0.17.8" +version = "0.17.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", - "cfg-if 1.0.0", - "getrandom 0.2.15", + "cfg-if 1.0.3", + "getrandom 0.2.16", "libc", - "spin", "untrusted", "windows-sys 0.52.0", ] [[package]] name = "rsa" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" +checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b" dependencies = [ "const-oid", "digest 0.10.7", @@ -4175,21 +4348,15 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" -version = "1.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc-hash" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" [[package]] name = "rustc_version" @@ -4212,15 +4379,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.42" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.4", "errno", "libc", "linux-raw-sys", - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -4237,16 +4404,16 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.20" +version = "0.23.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +checksum = "cd3c25631629d034ce7cd9940adc9d45762d46de2b0f57193c4443b92c6d4d40" dependencies = [ "aws-lc-rs", "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki 0.103.6", "subtle", "zeroize", ] @@ -4271,11 +4438,12 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" +checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" dependencies = [ "web-time", + "zeroize", ] [[package]] @@ -4290,9 +4458,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.8" +version = "0.103.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +checksum = "8572f3c2cb9934231157b45499fc41e1f58c589fdfb81a844ba873265e80f8eb" dependencies = [ "aws-lc-rs", "ring", @@ -4302,23 +4470,47 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "schannel" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.1", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", ] [[package]] @@ -4352,7 +4544,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.4", "core-foundation", "core-foundation-sys", "libc", @@ -4361,9 +4553,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.13.0" +version = "2.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" dependencies = [ "core-foundation-sys", "libc", @@ -4371,15 +4563,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.24" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" [[package]] name = "serde" -version = "1.0.221" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "341877e04a22458705eb4e131a1508483c877dca2792b3781d4e5d8a6019ec43" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -4387,76 +4579,79 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.15" +version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" dependencies = [ "serde", + "serde_core", ] [[package]] name = "serde_core" -version = "1.0.221" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c459bc0a14c840cb403fc14b148620de1e0778c96ecd6e0c8c3cacb6d8d00fe" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.221" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6185cf75117e20e62b1ff867b9518577271e58abe0037c40bb4794969355ab0" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "serde_html_form" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d2de91cf02bbc07cde38891769ccd5d4f073d22a40683aa4bc7a95781aaa2c4" +checksum = "b2f2d7ff8a2140333718bb329f5c40fc5f0865b84c426183ce14c97d2ab8154f" dependencies = [ "form_urlencoded", - "indexmap 2.7.0", + "indexmap 2.11.4", "itoa", "ryu", - "serde", + "serde_core", ] [[package]] name = "serde_json" -version = "1.0.134" +version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ - "indexmap 2.7.0", + "indexmap 2.11.4", "itoa", "memchr", "ryu", "serde", + "serde_core", ] [[package]] name = "serde_path_to_error" -version = "0.1.16" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" dependencies = [ "itoa", "serde", + "serde_core", ] [[package]] name = "serde_spanned" -version = "0.6.8" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "5417783452c2be558477e104686f7de5dae53dba813c28435e0e70f82d9b04ee" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -4473,15 +4668,17 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.12.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +checksum = "c522100790450cf78eeac1507263d0a350d4d5b30df0c8e1fe051a10c22b376e" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.7.0", + "indexmap 2.11.4", + "schemars 0.9.0", + "schemars 1.0.4", "serde", "serde_derive", "serde_json", @@ -4491,25 +4688,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.12.0" +version = "3.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +checksum = "327ada00f7d64abaac1e55a6911e90cf665aa051b9a561c7006c157f4633135e" dependencies = [ - "darling", + "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.93", -] - -[[package]] -name = "sha-1" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.7", + "syn 2.0.106", ] [[package]] @@ -4518,7 +4704,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "cpufeatures", "digest 0.10.7", ] @@ -4536,7 +4722,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if 1.0.3", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -4544,11 +4730,11 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "cpufeatures", "digest 0.10.7", ] @@ -4570,9 +4756,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] @@ -4589,21 +4775,21 @@ dependencies = [ [[package]] name = "simple_asn1" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" dependencies = [ "num-bigint", "num-traits", - "thiserror 1.0.69", + "thiserror 2.0.16", "time", ] [[package]] name = "siphasher" -version = "0.3.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "sketches-ddsketch" @@ -4613,32 +4799,39 @@ checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" [[package]] name = "slab" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" dependencies = [ "serde", ] [[package]] name = "socket2" -version = "0.5.8" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "spin" version = "0.9.8" @@ -4658,21 +4851,11 @@ dependencies = [ "der", ] -[[package]] -name = "sqlformat" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" -dependencies = [ - "nom", - "unicode_categories", -] - [[package]] name = "sqlx" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93334716a037193fac19df402f8571269c84a00852f6a7066b5d2616dcd64d3e" +checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" dependencies = [ "sqlx-core", "sqlx-macros", @@ -4683,64 +4866,58 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e" +checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" dependencies = [ - "atoi", - "byteorder", + "base64 0.22.1", "bytes", "crc", "crossbeam-queue", "either", - "event-listener 5.3.1", - "futures-channel", + "event-listener 5.4.1", "futures-core", "futures-intrusive", "futures-io", "futures-util", - "hashbrown 0.14.5", + "hashbrown 0.15.5", "hashlink", - "hex", - "indexmap 2.7.0", + "indexmap 2.11.4", "log", "memchr", "once_cell", - "paste", "percent-encoding", - "rustls 0.23.20", - "rustls-pemfile 2.2.0", + "rustls 0.23.32", "serde", "serde_json", - "sha2 0.10.8", + "sha2 0.10.9", "smallvec", - "sqlformat", - "thiserror 1.0.69", + "thiserror 2.0.16", "tokio", "tokio-stream", "tracing", "url", - "webpki-roots 0.26.7", + "webpki-roots 0.26.11", ] [[package]] name = "sqlx-macros" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac0692bcc9de3b073e8d747391827297e075c7710ff6276d9f7a1f3d58c6657" +checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "sqlx-macros-core" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1804e8a7c7865599c9c79be146dc8a9fd8cc86935fa641d3ea58e5f0688abaa5" +checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" dependencies = [ "dotenvy", "either", @@ -4751,26 +4928,25 @@ dependencies = [ "quote", "serde", "serde_json", - "sha2 0.10.8", + "sha2 0.10.9", "sqlx-core", "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.93", - "tempfile", + "syn 2.0.106", "tokio", "url", ] [[package]] name = "sqlx-mysql" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64bb4714269afa44aef2755150a0fc19d756fb580a67db8885608cf02f47d06a" +checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.6.0", + "bitflags 2.9.4", "byteorder", "bytes", "crc", @@ -4795,31 +4971,30 @@ dependencies = [ "rsa", "serde", "sha1", - "sha2 0.10.8", + "sha2 0.10.9", "smallvec", "sqlx-core", "stringprep", - "thiserror 1.0.69", + "thiserror 2.0.16", "tracing", "whoami", ] [[package]] name = "sqlx-postgres" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa91a732d854c5d7726349bb4bb879bb9478993ceb764247660aee25f67c2f8" +checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" dependencies = [ "atoi", "base64 0.22.1", - "bitflags 2.6.0", + "bitflags 2.9.4", "byteorder", "crc", "dotenvy", "etcetera", "futures-channel", "futures-core", - "futures-io", "futures-util", "hex", "hkdf", @@ -4833,20 +5008,20 @@ dependencies = [ "rand 0.8.5", "serde", "serde_json", - "sha2 0.10.8", + "sha2 0.10.9", "smallvec", "sqlx-core", "stringprep", - "thiserror 1.0.69", + "thiserror 2.0.16", "tracing", "whoami", ] [[package]] name = "sqlx-sqlite" -version = "0.8.2" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5b2cf34a45953bfd3daaf3db0f7a7878ab9b7a6b91b422d24a7a9e4c857b680" +checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" dependencies = [ "atoi", "flume", @@ -4861,6 +5036,7 @@ dependencies = [ "serde", "serde_urlencoded", "sqlx-core", + "thiserror 2.0.16", "tracing", "url", ] @@ -4901,15 +5077,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", - "quote", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.93" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c786062daee0d6db1132800e623df74274a0a87322d8e183338e01b3d98d058" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -4933,13 +5108,13 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -4959,7 +5134,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.4", "core-foundation", "system-configuration-sys 0.6.0", ] @@ -4998,21 +5173,21 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-triple" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a4d50cdb458045afc8131fd91b64904da29548bcb63c7236e0844936c13078" +checksum = "1ac9aa371f599d22256307c24a9d748c041e548cbf599f35d890f9d365361790" [[package]] name = "tempfile" -version = "3.14.0" +version = "3.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c" +checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ - "cfg-if 1.0.0", "fastrand", + "getrandom 0.3.3", "once_cell", "rustix", - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -5035,11 +5210,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.9" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ - "thiserror-impl 2.0.9", + "thiserror-impl 2.0.16", ] [[package]] @@ -5050,35 +5225,34 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "thiserror-impl" -version = "2.0.9" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ - "cfg-if 1.0.0", - "once_cell", + "cfg-if 1.0.3", ] [[package]] name = "time" -version = "0.3.37" +version = "0.3.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" +checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" dependencies = [ "deranged", "itoa", @@ -5091,25 +5265,34 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" [[package]] name = "time-macros" -version = "0.2.19" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" dependencies = [ "num-conv", "time-core", ] [[package]] -name = "tinystr" -version = "0.7.6" +name = "tiny-keccak" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" dependencies = [ "displaydoc", "zerovec", @@ -5117,9 +5300,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] @@ -5132,20 +5315,22 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.2" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "slab", + "socket2 0.6.0", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5156,7 +5341,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] @@ -5182,9 +5367,9 @@ dependencies = [ [[package]] name = "tokio-postgres" -version = "0.7.12" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b5d3742945bc7d7f210693b0c58ae542c6fd47b17adbbda0885f3dcb34a6bdb" +checksum = "a156efe7fff213168257853e1dfde202eed5f487522cbbbf7d219941d753d853" dependencies = [ "async-trait", "byteorder", @@ -5199,8 +5384,8 @@ dependencies = [ "pin-project-lite", "postgres-protocol", "postgres-types", - "rand 0.8.5", - "socket2", + "rand 0.9.2", + "socket2 0.6.0", "tokio", "tokio-util", "whoami", @@ -5218,11 +5403,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.1" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.20", + "rustls 0.23.32", "tokio", ] @@ -5251,9 +5436,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.13" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -5265,38 +5450,43 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.19" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0" dependencies = [ - "serde", + "indexmap 2.11.4", + "serde_core", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_parser", + "toml_writer", + "winnow", ] [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "32f1085dec27c2b6632b04c80b3bb1b4300d6495d1e129693bdda7d91e72eec1" dependencies = [ - "serde", + "serde_core", ] [[package]] -name = "toml_edit" -version = "0.22.22" +name = "toml_parser" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "4cf893c33be71572e0e9aa6dd15e6677937abd686b066eac3f8cd3531688a627" dependencies = [ - "indexmap 2.7.0", - "serde", - "serde_spanned", - "toml_datetime", "winnow", ] +[[package]] +name = "toml_writer" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d163a63c116ce562a22cda521fcc4d79152e7aba014456fb5eb442f6d6a10109" + [[package]] name = "tower" version = "0.4.13" @@ -5321,7 +5511,7 @@ dependencies = [ "futures-core", "futures-util", "hdrhistogram", - "indexmap 2.7.0", + "indexmap 2.11.4", "pin-project-lite", "slab", "sync_wrapper 1.0.2", @@ -5338,10 +5528,10 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.4", "bytes", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", "http-range-header", @@ -5360,17 +5550,17 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.2" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" +checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ "async-compression", "base64 0.22.1", - "bitflags 2.6.0", + "bitflags 2.9.4", "bytes", "futures-core", "futures-util", - "http 1.2.0", + "http 1.3.1", "http-body 1.0.1", "http-body-util", "http-range-header", @@ -5415,20 +5605,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", "valuable", @@ -5457,14 +5647,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "serde", "serde_json", "sharded-slab", @@ -5484,9 +5674,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "trybuild" -version = "1.0.101" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dcd332a5496c026f1e14b7f3d2b7bd98e509660c04239c58b0ba38a12daded4" +checksum = "0ded9fdb81f30a5708920310bfcd9ea7482ff9cba5f54601f7a19a877d5c2392" dependencies = [ "glob", "serde", @@ -5505,24 +5695,33 @@ checksum = "8628dcc84e5a09eb3d8423d6cb682965dea9133204e8fb3efee74c2a0c259442" dependencies = [ "bytes", "data-encoding", - "http 1.2.0", + "http 1.3.1", "httparse", "log", - "rand 0.9.1", + "rand 0.9.2", "sha1", - "thiserror 2.0.9", + "thiserror 2.0.16", "utf-8", ] [[package]] name = "typed-builder" -version = "0.10.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89851716b67b937e393b3daa8423e67ddfc4bbbf1654bcf05488e95e0828db0c" +checksum = "cd9d30e3a08026c78f246b173243cf07b3696d274debd26680773b6773c2afc7" +dependencies = [ + "typed-builder-macro", +] + +[[package]] +name = "typed-builder-macro" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c36781cc0e46a83726d9879608e4cf6c2505237e263a8eb8c24502989cfdb28" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.106", ] [[package]] @@ -5537,9 +5736,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "unicase" @@ -5555,9 +5754,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.14" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" +checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" [[package]] name = "unicode-normalization" @@ -5574,12 +5773,6 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - [[package]] name = "universal-hash" version = "0.5.1" @@ -5598,12 +5791,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.4" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", - "idna 1.0.3", + "idna 1.1.0", "percent-encoding", "serde", ] @@ -5614,12 +5807,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf16_iter" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" - [[package]] name = "utf8_iter" version = "1.0.4" @@ -5628,12 +5815,14 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.11.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.3.3", + "js-sys", "serde", + "wasm-bindgen", ] [[package]] @@ -5658,19 +5847,19 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df0bcf92720c40105ac4b2dda2a4ea3aa717d4d6a862cc217da653a4bd5c6b10" dependencies = [ - "darling", + "darling 0.20.11", "once_cell", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "vcpkg" @@ -5695,17 +5884,26 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.2+wasi-0.2.4" +version = "0.14.7+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" dependencies = [ - "wit-bindgen-rt", + "wasip2", +] + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", ] [[package]] @@ -5716,36 +5914,38 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.99" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "once_cell", + "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.99" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.49" +version = "0.4.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "js-sys", "once_cell", "wasm-bindgen", @@ -5754,9 +5954,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.99" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5764,22 +5964,25 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.99" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.99" +version = "0.2.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" +checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasm-streams" @@ -5796,9 +5999,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.76" +version = "0.3.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" dependencies = [ "js-sys", "wasm-bindgen", @@ -5822,41 +6025,38 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.7" +version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" +checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" +dependencies = [ + "webpki-roots 1.0.2", +] + +[[package]] +name = "webpki-roots" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2" dependencies = [ "rustls-pki-types", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "whoami" -version = "1.5.2" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" dependencies = [ - "redox_syscall", + "libredox", "wasite", "web-sys", ] [[package]] name = "widestring" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" +checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d" [[package]] name = "winapi" @@ -5876,11 +6076,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.1", ] [[package]] @@ -5891,41 +6091,96 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.52.0" +version = "0.62.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "6844ee5416b285084d3d3fffd743b925a6c9385455f64f6d4fa3031c4c2749a9" dependencies = [ - "windows-targets 0.52.6", + "windows-implement", + "windows-interface", + "windows-link 0.2.0", + "windows-result 0.4.0", + "windows-strings 0.5.0", ] [[package]] -name = "windows-registry" +name = "windows-implement" +version = "0.60.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edb307e42a74fb6de9bf3a02d9712678b22399c87e6fa869d6dfcd8c1b7754e0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "windows-interface" +version = "0.59.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0abd1ddbc6964ac14db11c7213d6532ef34bd9aa042c2e5935f59d7908b46a5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" + +[[package]] +name = "windows-registry" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ - "windows-result", - "windows-strings", - "windows-targets 0.52.6", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", ] [[package]] name = "windows-result" -version = "0.2.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-targets 0.52.6", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-result" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" +dependencies = [ + "windows-link 0.2.0", ] [[package]] name = "windows-strings" -version = "0.1.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "windows-result", - "windows-targets 0.52.6", + "windows-link 0.1.3", +] + +[[package]] +name = "windows-strings" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" +dependencies = [ + "windows-link 0.2.0", ] [[package]] @@ -5955,6 +6210,24 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.4", +] + +[[package]] +name = "windows-sys" +version = "0.61.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f109e41dd4a3c848907eb83d5a42ea98b3769495597450cf6d153507b166f0f" +dependencies = [ + "windows-link 0.2.0", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -5979,13 +6252,30 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d42b7b7f66d2a06854650af09cfdf8713e427a439c97ad65a6375318033ac4b" +dependencies = [ + "windows-link 0.2.0", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -5998,6 +6288,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -6010,6 +6306,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -6022,12 +6324,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -6040,6 +6354,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -6052,6 +6372,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -6064,6 +6390,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -6077,13 +6409,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "winnow" -version = "0.6.21" +name = "windows_x86_64_msvc" +version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f5bb5257f2407a5425c6e749bfd9692192a73e70a6060516ac04f889087d68" -dependencies = [ - "memchr", -] +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + +[[package]] +name = "winnow" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" [[package]] name = "winreg" @@ -6091,30 +6426,21 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if 1.0.3", "windows-sys 0.48.0", ] [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.6.0", -] - -[[package]] -name = "write16" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "writeable" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" [[package]] name = "wyz" @@ -6127,9 +6453,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" dependencies = [ "serde", "stable_deref_trait", @@ -6139,55 +6465,54 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.7.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", "synstructure", ] [[package]] name = "zerocopy" -version = "0.7.35" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ - "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "zerofrom" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", "synstructure", ] @@ -6198,10 +6523,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] -name = "zerovec" -version = "0.10.4" +name = "zerotrie" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" dependencies = [ "yoke", "zerofrom", @@ -6210,38 +6546,38 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.10.3" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.93", + "syn 2.0.106", ] [[package]] name = "zstd" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.2.1" +version = "7.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a3ab4db68cea366acc5c897c7b4d4d1b8994a9cd6e6f841f8964566a419059" +checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.13+zstd.1.5.6" +version = "2.0.16+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" +checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" dependencies = [ "cc", "pkg-config", From 651cc1e9353c3417f5ac546c60ce27981fe40cf5 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 28 Sep 2025 19:37:31 +0200 Subject: [PATCH 26/30] Remove unused link def --- axum/src/docs/extract.md | 1 - 1 file changed, 1 deletion(-) diff --git a/axum/src/docs/extract.md b/axum/src/docs/extract.md index ff0a37e4..4659d908 100644 --- a/axum/src/docs/extract.md +++ b/axum/src/docs/extract.md @@ -686,5 +686,4 @@ logs, enable the `tracing` feature for axum (enabled by default) and the [customize-extractor-error]: https://github.com/tokio-rs/axum/blob/main/examples/customize-extractor-error/src/main.rs [`HeaderMap`]: https://docs.rs/http/latest/http/header/struct.HeaderMap.html [`Request`]: https://docs.rs/http/latest/http/struct.Request.html -[`RequestParts::body_mut`]: crate::extract::RequestParts::body_mut [`JsonRejection::JsonDataError`]: rejection::JsonRejection::JsonDataError From ae808502236f6333a2e817434002a1ae9a5dd1f7 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 13 Sep 2025 21:48:25 +0900 Subject: [PATCH 27/30] Update to cargo-deny api version 2 (#3475) --- .github/workflows/CI.yml | 2 +- deny.toml | 18 ++++++++++-------- examples/reverse-proxy/Cargo.toml | 1 + 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3eb2c281..f6b6c4b3 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -177,7 +177,7 @@ jobs: - bans licenses sources steps: - uses: actions/checkout@v4 - - uses: EmbarkStudios/cargo-deny-action@v1 + - uses: EmbarkStudios/cargo-deny-action@v2 with: command: check ${{ matrix.checks }} manifest-path: axum/Cargo.toml diff --git a/deny.toml b/deny.toml index cf796d19..2a8bba1d 100644 --- a/deny.toml +++ b/deny.toml @@ -1,16 +1,18 @@ +[graph] +exclude-unpublished = true + [advisories] -vulnerability = "deny" -unmaintained = "warn" -notice = "warn" +unmaintained = "none" ignore = [] [licenses] -unlicensed = "warn" -allow = [] -deny = [] -copyleft = "warn" -allow-osi-fsf-free = "either" confidence-threshold = 0.8 +allow = [ + "Apache-2.0", + "BSD-3-Clause", + "MIT", + "Unicode-3.0", +] [bans] multiple-versions = "deny" diff --git a/examples/reverse-proxy/Cargo.toml b/examples/reverse-proxy/Cargo.toml index e2816573..0f234077 100644 --- a/examples/reverse-proxy/Cargo.toml +++ b/examples/reverse-proxy/Cargo.toml @@ -2,6 +2,7 @@ name = "example-reverse-proxy" version = "0.1.0" edition = "2021" +publish = false [dependencies] axum = { path = "../../axum" } From a0692f9f540967166204ab09182ae1d5a0cd2134 Mon Sep 17 00:00:00 2001 From: Antoine Vandecreme Date: Tue, 2 Sep 2025 21:34:17 +0200 Subject: [PATCH 28/30] Reject JSON bodies with trailing chars (#3453) --- axum/src/json.rs | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/axum/src/json.rs b/axum/src/json.rs index c8c9b60b..59f2c859 100644 --- a/axum/src/json.rs +++ b/axum/src/json.rs @@ -189,12 +189,16 @@ where } } - let deserializer = &mut serde_json::Deserializer::from_slice(bytes); + let mut deserializer = serde_json::Deserializer::from_slice(bytes); - match serde_path_to_error::deserialize(deserializer) { - Ok(value) => Ok(Json(value)), - Err(err) => Err(make_rejection(err)), - } + serde_path_to_error::deserialize(&mut deserializer) + .map_err(make_rejection) + .and_then(|value| { + deserializer + .end() + .map(|()| Self(value)) + .map_err(|err| JsonSyntaxError::from_err(err).into()) + }) } } @@ -311,6 +315,30 @@ mod tests { assert_eq!(res.status(), StatusCode::BAD_REQUEST); } + #[crate::test] + async fn extra_chars_after_valid_json_syntax() { + #[derive(Debug, Deserialize)] + struct Input { + foo: String, + } + + let app = Router::new().route("/", post(|input: Json| async { input.0.foo })); + + let client = TestClient::new(app); + let res = client + .post("/") + .body(r#"{ "foo": "bar" } baz "#) + .header("content-type", "application/json") + .await; + + assert_eq!(res.status(), StatusCode::BAD_REQUEST); + let body_text = res.text().await; + assert_eq!( + body_text, + "Failed to parse the request body as JSON: trailing characters at line 1 column 18" + ); + } + #[derive(Deserialize)] struct Foo { #[allow(dead_code)] From ad2fd5b50b98502bc5966cac37e345fa0698e0b0 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 28 Sep 2025 20:16:22 +0200 Subject: [PATCH 29/30] Update changelogs --- axum-core/CHANGELOG.md | 1 + axum-extra/CHANGELOG.md | 6 ++++++ axum/CHANGELOG.md | 23 +++++++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/axum-core/CHANGELOG.md b/axum-core/CHANGELOG.md index 10e99e56..3119b6d7 100644 --- a/axum-core/CHANGELOG.md +++ b/axum-core/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **added:** `DefaultBodyLimit::apply` for changing the `DefaultBodyLimit` inside extractors. ([#3368]) +- **changed:** Update minimum rust version to 1.78 ([#3412]) [#3368]: https://github.com/tokio-rs/axum/pull/3366 diff --git a/axum-extra/CHANGELOG.md b/axum-extra/CHANGELOG.md index 1556fe1f..c3be8589 100644 --- a/axum-extra/CHANGELOG.md +++ b/axum-extra/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning]. +# Unreleased + +- **added:** Implement `OptionalFromRequest` for `Host` ([#3177]) + +[#3177]: https://github.com/tokio-rs/axum/pull/3177 + # 0.11.0 Yanked from crates.io due to unforeseen breaking change, see [#3190] for details. diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index bbd9cb67..864c10cd 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -5,6 +5,29 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +# Unreleased + +- **fixed:** Reject JSON request bodies with trailing characters after the JSON document ([#3453]) +- **added:** Implement `OptionalFromRequest` for `Multipart` ([#3220]) +- **added:** Getter methods `Location::{status_code, location}` +- **added:** Support for writing arbitrary binary data into server-sent events ([#3425])] +- **added:** `middleware::ResponseAxumBodyLayer` for mapping response body to `axum::body::Body` ([#3469]) +- **added:** `impl FusedStream for WebSocket` ([#3443]) +- **changed:** The `sse` module and `Sse` type no longer depend on the `tokio` feature ([#3154]) +- **changed:** If the location given to one of `Redirect`s constructors is not a valid + header value, instead of panicking on construction, the `IntoResponse` impl now returns + an HTTP 500, just like `Json` does when serialization fails ([#3377]) +- **changed:** Update minimum rust version to 1.78 ([#3412]) + +[#3154]: https://github.com/tokio-rs/axum/pull/3154 +[#3220]: https://github.com/tokio-rs/axum/pull/3220 +[#3377]: https://github.com/tokio-rs/axum/pull/3377 +[#3412]: https://github.com/tokio-rs/axum/pull/3412 +[#3425]: https://github.com/tokio-rs/axum/pull/3425 +[#3443]: https://github.com/tokio-rs/axum/pull/3443 +[#3453]: https://github.com/tokio-rs/axum/pull/3453 +[#3469]: https://github.com/tokio-rs/axum/pull/3469 + # 0.8.4 - **added:** `Router::reset_fallback` ([#3320]) From a1d22f68a593967a83c1028efb70554b88525cf2 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 28 Sep 2025 20:17:33 +0200 Subject: [PATCH 30/30] Release axum 0.8.5 and related crates --- Cargo.lock | 6 +++--- axum-core/CHANGELOG.md | 2 +- axum-core/Cargo.toml | 2 +- axum-extra/CHANGELOG.md | 12 ++++++------ axum-extra/Cargo.toml | 6 +++--- axum/CHANGELOG.md | 2 +- axum/Cargo.toml | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ec7022f4..12822616 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -292,7 +292,7 @@ dependencies = [ [[package]] name = "axum" -version = "0.8.4" +version = "0.8.5" dependencies = [ "anyhow", "axum-core", @@ -339,7 +339,7 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.5.2" +version = "0.5.3" dependencies = [ "axum", "axum-extra", @@ -363,7 +363,7 @@ dependencies = [ [[package]] name = "axum-extra" -version = "0.10.1" +version = "0.10.2" dependencies = [ "axum", "axum-core", diff --git a/axum-core/CHANGELOG.md b/axum-core/CHANGELOG.md index 3119b6d7..f60f82b4 100644 --- a/axum-core/CHANGELOG.md +++ b/axum-core/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -# Unreleased +# 0.5.3 - **added:** `DefaultBodyLimit::apply` for changing the `DefaultBodyLimit` inside extractors. ([#3368]) diff --git a/axum-core/Cargo.toml b/axum-core/Cargo.toml index 99d1b859..3b3b2f8a 100644 --- a/axum-core/Cargo.toml +++ b/axum-core/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT" name = "axum-core" readme = "README.md" repository = "https://github.com/tokio-rs/axum" -version = "0.5.2" # remember to bump the version that axum and axum-extra depend on +version = "0.5.3" # remember to bump the version that axum and axum-extra depend on [features] tracing = ["dep:tracing"] diff --git a/axum-extra/CHANGELOG.md b/axum-extra/CHANGELOG.md index c3be8589..97b0220b 100644 --- a/axum-extra/CHANGELOG.md +++ b/axum-extra/CHANGELOG.md @@ -5,18 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning]. -# Unreleased - -- **added:** Implement `OptionalFromRequest` for `Host` ([#3177]) - -[#3177]: https://github.com/tokio-rs/axum/pull/3177 - # 0.11.0 Yanked from crates.io due to unforeseen breaking change, see [#3190] for details. [#3190]: https://github.com/tokio-rs/axum/pull/3190 +# 0.10.2 + +- **added:** Implement `OptionalFromRequest` for `Host` ([#3177]) + +[#3177]: https://github.com/tokio-rs/axum/pull/3177 + # 0.10.1 - **fixed:** Fix a broken link in the documentation of `ErasedJson` ([#3186]) diff --git a/axum-extra/Cargo.toml b/axum-extra/Cargo.toml index 03ae4f02..2554dbee 100644 --- a/axum-extra/Cargo.toml +++ b/axum-extra/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT" name = "axum-extra" readme = "README.md" repository = "https://github.com/tokio-rs/axum" -version = "0.10.1" +version = "0.10.2" [features] default = ["tracing"] @@ -47,8 +47,8 @@ typed-routing = ["dep:axum-macros", "dep:percent-encoding", "dep:serde_html_form __private_docs = ["axum/json", "dep:serde", "dep:tower"] [dependencies] -axum = { path = "../axum", version = "0.8.4", default-features = false, features = ["original-uri"] } -axum-core = { path = "../axum-core", version = "0.5.2" } +axum = { path = "../axum", version = "0.8.5", default-features = false, features = ["original-uri"] } +axum-core = { path = "../axum-core", version = "0.5.3" } bytes = "1.1.0" futures-util = { version = "0.3", default-features = false, features = ["alloc"] } http = "1.0.0" diff --git a/axum/CHANGELOG.md b/axum/CHANGELOG.md index 864c10cd..9ecae4cf 100644 --- a/axum/CHANGELOG.md +++ b/axum/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -# Unreleased +# 0.8.5 - **fixed:** Reject JSON request bodies with trailing characters after the JSON document ([#3453]) - **added:** Implement `OptionalFromRequest` for `Multipart` ([#3220]) diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 5d6d4e9d..e929e9dd 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "axum" -version = "0.8.4" # remember to bump the version that axum-extra depends on +version = "0.8.5" # remember to bump the version that axum-extra depends on categories = ["asynchronous", "network-programming", "web-programming::http-server"] description = "Web framework that focuses on ergonomics and modularity" edition = "2021" @@ -52,7 +52,7 @@ __private_docs = [ __private = ["tokio", "http1", "dep:reqwest"] [dependencies] -axum-core = { path = "../axum-core", version = "0.5.2" } +axum-core = { path = "../axum-core", version = "0.5.3" } bytes = "1.0" futures-util = { version = "0.3", default-features = false, features = ["alloc"] } http = "1.0.0"