From edef2d53360f3ae4ea32de52c79b034b1a35176f Mon Sep 17 00:00:00 2001 From: Antonio Yang Date: Sun, 26 Jul 2026 09:54:13 +0800 Subject: [PATCH 1/3] Add `#[test_with::runtime_ip*]` - Add `#[test_with::runtime_ip_in(...)]` to check the ip from interfaces - Add `#[test_with::runtime_public_ip]`, `#[test_with::runtime_public_ip_in]` and `#[test_with::runtime_public_ip_is]` to check the public ip --- Cargo.lock | 137 ++++++++++ README.md | 53 ++++ derive/Cargo.toml | 1 + derive/src/lib.rs | 120 +++++++++ derive/src/runtime_ip.rs | 374 ++++++++++++++++++++++++++++ examples-with-runner/Cargo.toml | 2 +- examples-with-runner/examples/ip.rs | 40 +++ lib/Cargo.toml | 3 + lib/src/lib.rs | 10 +- 9 files changed, 737 insertions(+), 3 deletions(-) create mode 100644 derive/src/runtime_ip.rs create mode 100644 examples-with-runner/examples/ip.rs diff --git a/Cargo.lock b/Cargo.lock index 9ead98a..04506f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -232,6 +232,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes" version = "1.11.0" @@ -372,6 +378,72 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.119", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "derive_builder" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" +dependencies = [ + "derive_builder_macro", +] + +[[package]] +name = "derive_builder_core" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "derive_builder_macro" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" +dependencies = [ + "derive_builder_core", + "syn 2.0.119", +] + [[package]] name = "dispatch2" version = "0.3.1" @@ -405,6 +477,12 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" +[[package]] +name = "either" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" + [[package]] name = "encoding_rs" version = "0.8.35" @@ -565,6 +643,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "getset" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6cf442baaabe4213ce7d1239afc26c039180b6456da2cededa316ae2c8a77a77" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + [[package]] name = "glob" version = "0.3.3" @@ -825,6 +914,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "1.1.0" @@ -950,6 +1045,17 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +[[package]] +name = "local-ip-address" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa08fb2b1ec3ea84575e94b489d06d4ce0cbf052d12acd515838f50e3c3d63e3" +dependencies = [ + "libc", + "neli", + "windows-sys 0.61.2", +] + [[package]] name = "lock_api" version = "0.4.14" @@ -994,6 +1100,35 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "neli" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22f9786d56d972959e1408b6a93be6af13b9c1392036c5c1fafa08a1b0c6ee87" +dependencies = [ + "bitflags", + "byteorder", + "derive_builder", + "getset", + "libc", + "log", + "neli-proc-macros", + "parking_lot", +] + +[[package]] +name = "neli-proc-macros" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05d8d08c6e98f20a62417478ebf7be8e1425ec9acecc6f63e22da633f6b71609" +dependencies = [ + "either", + "proc-macro2", + "quote", + "serde", + "syn 2.0.119", +] + [[package]] name = "ntapi" version = "0.4.2" @@ -1919,7 +2054,9 @@ version = "0.16.4" dependencies = [ "byte-unit", "chrono", + "ipnet", "libtest-mimic", + "local-ip-address", "num_cpus", "ping", "reqwest", diff --git a/README.md b/README.md index 913ff52..0f673f3 100644 --- a/README.md +++ b/README.md @@ -309,6 +309,59 @@ mod custom_mod { } ``` +or you can run the test case only when one of the network interface ip is in a CIDR with +`runtime_ip_in`. It requires the `ip` feature (with the `runtime` feature) if default features +are disabled. +```rust +test_with::runner!(ip); + +#[test_with::module] +mod ip { + // Only run when one of the interface ip is in 192.168.1.0/24 + #[test_with::runtime_ip_in(192.168.1.0/24)] + fn test_works() { + assert!(true); + } +} +``` + +or you can run the test case depending on the public ip with `runtime_public_ip` (run when the +public ip can be got), `runtime_public_ip_in` (run when the public ip is in a CIDR) and +`runtime_public_ip_is` (run when the public ip is exactly the expected ip). They default to check +the public ip with `https://ip.me`, and it can be overridden with an `ip_check_site` string +literal. They require the `ip` feature (with the `runtime` feature) if default features are +disabled. +```rust +test_with::runner!(ip); + +#[test_with::module] +mod ip { + // Only run when the public ip can be got from https://ip.me + #[test_with::runtime_public_ip] + fn test_works() { + assert!(true); + } + + // Override the check site (url has to be a string literal) + #[test_with::runtime_public_ip(ip_check_site = "https://ifconfig.me/ip")] + fn test_works_with_other_site() { + assert!(true); + } + + // Only run when the public ip is in 1.2.3.0/24 + #[test_with::runtime_public_ip_in(1.2.3.0/24)] + fn test_works_in_cidr() { + assert!(true); + } + + // Only run when the public ip is exactly 1.2.3.4 + #[test_with::runtime_public_ip_is(1.2.3.4)] + fn test_works_is() { + assert!(true); + } +} +``` + There are two ways to setup mock service in the test runner, one is by `struct` and the other is by `type`. ```rust test_with::runner!(test_with_mock); diff --git a/derive/Cargo.toml b/derive/Cargo.toml index e84a997..2a0d1b5 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -39,6 +39,7 @@ runtime = [] net = ["http", "icmp"] http = ["reqwest"] icmp = ["ping"] +ip = [] resource = ["sysinfo", "byte-unit", "num_cpus"] user = ["uzers"] diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 228b812..3e29216 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -18,6 +18,9 @@ mod icmp; mod resource; #[cfg(feature = "runtime")] mod runtime; +#[cfg(all(feature = "runtime", feature = "ip"))] +mod runtime_ip; + mod socket; #[cfg(feature = "timezone")] mod timezone; @@ -477,6 +480,123 @@ pub fn runtime_icmp(attr: TokenStream, stream: TokenStream) -> TokenStream { icmp::runtime_icmp(attr, stream) } +/// Run test case when the example running and one of the interface ip is in the CIDR. +///```rust +/// // write as example in examples/*rs +/// test_with::runner!(ip); +/// #[test_with::module] +/// mod ip { +/// // Only works when one of the interface ip is in 192.168.1.0/24 +/// #[test_with::runtime_ip_in(192.168.1.0/24)] +/// fn test_works() { +/// assert!(true); +/// } +/// } +#[cfg(all(not(feature = "runtime"), feature = "ip"))] +#[proc_macro_attribute] +pub fn runtime_ip_in(_attr: TokenStream, _stream: TokenStream) -> TokenStream { + panic!("should be used with runtime feature") +} + +#[cfg(all(feature = "runtime", feature = "ip"))] +#[proc_macro_attribute] +pub fn runtime_ip_in(attr: TokenStream, stream: TokenStream) -> TokenStream { + runtime_ip::runtime_ip_in(attr, stream) +} + +/// Run test case when the example running and the public ip can be got. +/// The default check site is `https://ip.me`, and can be overridden with `ip_check_site=`. +///```rust +/// // write as example in examples/*rs +/// test_with::runner!(ip); +/// #[test_with::module] +/// mod ip { +/// // Only works when the public ip can be got from https://ip.me +/// #[test_with::runtime_public_ip] +/// fn test_works() { +/// assert!(true); +/// } +/// +/// // Or override the check site (url has to be a string literal) +/// #[test_with::runtime_public_ip(ip_check_site = "https://ipinfo.io/ip")] +/// fn test_works_with_other_site() { +/// assert!(true); +/// } +/// } +#[cfg(all(not(feature = "runtime"), feature = "ip"))] +#[proc_macro_attribute] +pub fn runtime_public_ip(_attr: TokenStream, _stream: TokenStream) -> TokenStream { + panic!("should be used with runtime feature") +} + +#[cfg(all(feature = "runtime", feature = "ip"))] +#[proc_macro_attribute] +pub fn runtime_public_ip(attr: TokenStream, stream: TokenStream) -> TokenStream { + runtime_ip::runtime_public_ip(attr, stream) +} + +/// Run test case when the example running and the public ip is in the CIDR. +/// The default check site is `https://ip.me`, and can be overridden with `ip_check_site=`. +///```rust +/// // write as example in examples/*rs +/// test_with::runner!(ip); +/// #[test_with::module] +/// mod ip { +/// // Only works when the public ip is in 1.2.3.0/24 +/// #[test_with::runtime_public_ip_in(1.2.3.0/24)] +/// fn test_works() { +/// assert!(true); +/// } +/// +/// // Or override the check site (url has to be a string literal) +/// #[test_with::runtime_public_ip_in(1.2.3.0/24, ip_check_site = "https://ipinfo.io/ip")] +/// fn test_works_with_other_site() { +/// assert!(true); +/// } +/// } +#[cfg(all(not(feature = "runtime"), feature = "ip"))] +#[proc_macro_attribute] +pub fn runtime_public_ip_in(_attr: TokenStream, _stream: TokenStream) -> TokenStream { + panic!("should be used with runtime feature") +} + +#[cfg(all(feature = "runtime", feature = "ip"))] +#[proc_macro_attribute] +pub fn runtime_public_ip_in(attr: TokenStream, stream: TokenStream) -> TokenStream { + runtime_ip::runtime_public_ip_in(attr, stream) +} + +/// Run test case when the example running and the public ip is exactly the expected ip. +/// The default check site is `https://ip.me`, and can be overridden with `ip_check_site=`. +///```rust +/// // write as example in examples/*rs +/// test_with::runner!(ip); +/// #[test_with::module] +/// mod ip { +/// // Only works when the public ip is 1.2.3.4 +/// #[test_with::runtime_public_ip_is(1.2.3.4)] +/// fn test_works() { +/// assert!(true); +/// } +/// +/// // Or override the check site (url has to be a string literal) +/// #[test_with::runtime_public_ip_is(1.2.3.4, ip_check_site = "https://ipinfo.io/ip")] +/// fn test_works_with_other_site() { +/// assert!(true); +/// } +/// } +#[cfg(all(not(feature = "runtime"), feature = "ip"))] +#[proc_macro_attribute] +pub fn runtime_public_ip_is(_attr: TokenStream, _stream: TokenStream) -> TokenStream { + panic!("should be used with runtime feature") +} + +#[cfg(all(feature = "runtime", feature = "ip"))] +#[proc_macro_attribute] +pub fn runtime_public_ip_is(attr: TokenStream, stream: TokenStream) -> TokenStream { + runtime_ip::runtime_public_ip_is(attr, stream) +} + /// Run test case when socket connected /// /// ``` diff --git a/derive/src/runtime_ip.rs b/derive/src/runtime_ip.rs new file mode 100644 index 0000000..ffe727f --- /dev/null +++ b/derive/src/runtime_ip.rs @@ -0,0 +1,374 @@ +use proc_macro::TokenStream; +use syn::{parse_macro_input, ItemFn, ReturnType}; + +const DEFAULT_IP_CHECK_SITE: &str = "https://ip.me"; + +/// Parse the optional `ip_check_site=` override out of the attribute parts, falling back to +/// the default public ip check site. +fn parse_ip_check_site<'a>(parts: &[&'a str]) -> &'a str { + parts + .iter() + .find_map(|p| p.strip_prefix("ip_check_site=")) + // the url has to be a string literal (e.g. "https://ip.me") because a bare `//` would be + // lexed as a comment, so strip the surrounding quotes here + .map(|s| s.trim_matches('"')) + .unwrap_or(DEFAULT_IP_CHECK_SITE) +} + +/// Build an expression that fetches the public ip from the check site. The expression evaluates +/// to the parsed `std::net::IpAddr`, or early returns an ignored `Completion` from the enclosing +/// check function when the ip can not be got or parsed. Bind it at the call site, e.g. +/// `let public_ip: std::net::IpAddr = #fetch;`. +fn fetch_public_ip(site: &str, is_async: bool) -> proc_macro2::TokenStream { + if is_async { + quote::quote! { + match test_with::reqwest::get(#site).await { + Ok(resp) => match resp.text().await { + Ok(body) => match body.trim().parse() { + Ok(ip) => ip, + Err(_) => return Ok(test_with::Completion::ignored_with(format!("because can not parse public ip from {}", #site))), + }, + Err(_) => return Ok(test_with::Completion::ignored_with(format!("because can not get public ip from {}", #site))), + }, + Err(_) => return Ok(test_with::Completion::ignored_with(format!("because can not get public ip from {}", #site))), + } + } + } else { + quote::quote! { + match test_with::reqwest::blocking::get(#site) { + Ok(resp) => match resp.text() { + Ok(body) => match body.trim().parse() { + Ok(ip) => ip, + Err(_) => return Ok(test_with::Completion::ignored_with(format!("because can not parse public ip from {}", #site))), + }, + Err(_) => return Ok(test_with::Completion::ignored_with(format!("because can not get public ip from {}", #site))), + }, + Err(_) => return Ok(test_with::Completion::ignored_with(format!("because can not get public ip from {}", #site))), + } + } + } +} + +/// Run test case when the example running and the public ip can be got from the check site. +/// The default check site is `https://ip.me`, and can be overridden with `ip_check_site=`. +pub(crate) fn runtime_public_ip(attr: TokenStream, stream: TokenStream) -> TokenStream { + let attr_str = attr.to_string().replace(' ', ""); + let parts: Vec<&str> = if attr_str.is_empty() { + vec![] + } else { + attr_str.split(',').collect() + }; + let site = parse_ip_check_site(&parts); + let ItemFn { + attrs, + vis, + sig, + block, + } = parse_macro_input!(stream as ItemFn); + let syn::Signature { ident, .. } = sig.clone(); + let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); + + let check_fn = match (&sig.asyncness, &sig.output) { + (Some(_), ReturnType::Default) => { + let fetch = fetch_public_ip(site, true); + quote::quote! { + async fn #check_ident() -> Result { + let _public_ip: std::net::IpAddr = #fetch; + #ident().await; + Ok(test_with::Completion::Completed) + } + } + } + (Some(_), ReturnType::Type(_, _)) => { + let fetch = fetch_public_ip(site, true); + quote::quote! { + async fn #check_ident() -> Result { + let _public_ip: std::net::IpAddr = #fetch; + if let Err(e) = #ident().await { + Err(format!("{e:?}").into()) + } else { + Ok(test_with::Completion::Completed) + } + } + } + } + (None, _) => { + let fetch = fetch_public_ip(site, false); + quote::quote! { + fn #check_ident() -> Result { + let _public_ip: std::net::IpAddr = #fetch; + #ident(); + Ok(test_with::Completion::Completed) + } + } + } + }; + + quote::quote! { + #check_fn + #(#attrs)* + #vis #sig #block + } + .into() +} + +/// Run test case when the example running and the public ip is in the CIDR. +/// The default check site is `https://ip.me`, and can be overridden with `ip_check_site=`. +pub(crate) fn runtime_public_ip_in(attr: TokenStream, stream: TokenStream) -> TokenStream { + let attr_str = attr.to_string().replace(' ', ""); + let parts: Vec<&str> = attr_str.split(',').collect(); + let cidr = parts.first().copied().unwrap_or_default(); + if cidr.is_empty() || cidr.starts_with("ip_check_site=") { + return syn::Error::new( + proc_macro2::Span::call_site(), + "runtime_public_ip_in needs a CIDR, e.g. #[test_with::runtime_public_ip_in(1.2.3.0/24)]", + ) + .to_compile_error() + .into(); + } + let site = parse_ip_check_site(&parts[1..]); + let ItemFn { + attrs, + vis, + sig, + block, + } = parse_macro_input!(stream as ItemFn); + let syn::Signature { ident, .. } = sig.clone(); + let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); + + let check_fn = match (&sig.asyncness, &sig.output) { + (Some(_), ReturnType::Default) => { + let fetch = fetch_public_ip(site, true); + quote::quote! { + async fn #check_ident() -> Result { + let public_ip: std::net::IpAddr = #fetch; + let net: test_with::ipnet::IpNet = #cidr.parse().expect("CIDR is invalid"); + if net.contains(&public_ip) { + #ident().await; + Ok(test_with::Completion::Completed) + } else { + Ok(test_with::Completion::ignored_with(format!("because public ip {} not in {}", public_ip, #cidr))) + } + } + } + } + (Some(_), ReturnType::Type(_, _)) => { + let fetch = fetch_public_ip(site, true); + quote::quote! { + async fn #check_ident() -> Result { + let public_ip: std::net::IpAddr = #fetch; + let net: test_with::ipnet::IpNet = #cidr.parse().expect("CIDR is invalid"); + if net.contains(&public_ip) { + if let Err(e) = #ident().await { + Err(format!("{e:?}").into()) + } else { + Ok(test_with::Completion::Completed) + } + } else { + Ok(test_with::Completion::ignored_with(format!("because public ip {} not in {}", public_ip, #cidr))) + } + } + } + } + (None, _) => { + let fetch = fetch_public_ip(site, false); + quote::quote! { + fn #check_ident() -> Result { + let public_ip: std::net::IpAddr = #fetch; + let net: test_with::ipnet::IpNet = #cidr.parse().expect("CIDR is invalid"); + if net.contains(&public_ip) { + #ident(); + Ok(test_with::Completion::Completed) + } else { + Ok(test_with::Completion::ignored_with(format!("because public ip {} not in {}", public_ip, #cidr))) + } + } + } + } + }; + + quote::quote! { + #check_fn + #(#attrs)* + #vis #sig #block + } + .into() +} + +/// Run test case when the example running and the public ip is exactly the expected ip. +/// The default check site is `https://ip.me`, and can be overridden with `ip_check_site=`. +pub(crate) fn runtime_public_ip_is(attr: TokenStream, stream: TokenStream) -> TokenStream { + let attr_str = attr.to_string().replace(' ', ""); + let parts: Vec<&str> = attr_str.split(',').collect(); + let expected = parts.first().copied().unwrap_or_default(); + if expected.is_empty() || expected.starts_with("ip_check_site=") { + return syn::Error::new( + proc_macro2::Span::call_site(), + "runtime_public_ip_is needs an ip, e.g. #[test_with::runtime_public_ip_is(1.2.3.4)]", + ) + .to_compile_error() + .into(); + } + let site = parse_ip_check_site(&parts[1..]); + let ItemFn { + attrs, + vis, + sig, + block, + } = parse_macro_input!(stream as ItemFn); + let syn::Signature { ident, .. } = sig.clone(); + let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); + + let check_fn = match (&sig.asyncness, &sig.output) { + (Some(_), ReturnType::Default) => { + let fetch = fetch_public_ip(site, true); + quote::quote! { + async fn #check_ident() -> Result { + let public_ip: std::net::IpAddr = #fetch; + let expected_ip: std::net::IpAddr = #expected.parse().expect("ip is invalid"); + if public_ip == expected_ip { + #ident().await; + Ok(test_with::Completion::Completed) + } else { + Ok(test_with::Completion::ignored_with(format!("because public ip {} is not {}", public_ip, #expected))) + } + } + } + } + (Some(_), ReturnType::Type(_, _)) => { + let fetch = fetch_public_ip(site, true); + quote::quote! { + async fn #check_ident() -> Result { + let public_ip: std::net::IpAddr = #fetch; + let expected_ip: std::net::IpAddr = #expected.parse().expect("ip is invalid"); + if public_ip == expected_ip { + if let Err(e) = #ident().await { + Err(format!("{e:?}").into()) + } else { + Ok(test_with::Completion::Completed) + } + } else { + Ok(test_with::Completion::ignored_with(format!("because public ip {} is not {}", public_ip, #expected))) + } + } + } + } + (None, _) => { + let fetch = fetch_public_ip(site, false); + quote::quote! { + fn #check_ident() -> Result { + let public_ip: std::net::IpAddr = #fetch; + let expected_ip: std::net::IpAddr = #expected.parse().expect("ip is invalid"); + if public_ip == expected_ip { + #ident(); + Ok(test_with::Completion::Completed) + } else { + Ok(test_with::Completion::ignored_with(format!("because public ip {} is not {}", public_ip, #expected))) + } + } + } + } + }; + + quote::quote! { + #check_fn + #(#attrs)* + #vis #sig #block + } + .into() +} + +pub(crate) fn runtime_ip_in(attr: TokenStream, stream: TokenStream) -> TokenStream { + let attr_str = attr.to_string().replace(' ', ""); + let cidrs: Vec<&str> = attr_str.split(',').collect(); + let ItemFn { + attrs, + vis, + sig, + block, + } = parse_macro_input!(stream as ItemFn); + let syn::Signature { ident, .. } = sig.clone(); + let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); + + let check_fn = match (&sig.asyncness, &sig.output) { + (Some(_), ReturnType::Default) => quote::quote! { + async fn #check_ident() -> Result { + let interface_ips: Vec = match test_with::local_ip_address::list_afinet_netifas() { + Ok(ifas) => ifas.into_iter().map(|(_, ip)| ip).collect(), + Err(_) => panic!("can not get the ip of the interfaces"), + }; + let mut missing_cidrs = vec![]; + #( + let net: test_with::ipnet::IpNet = #cidrs.parse().expect("CIDR is invalid"); + if !interface_ips.iter().any(|ip| net.contains(ip)) { + missing_cidrs.push(#cidrs); + } + )* + match missing_cidrs.len() { + 0 => { + #ident().await; + Ok(test_with::Completion::Completed) + }, + 1 => Ok(test_with::Completion::ignored_with(format!("because no interface ip in {}", missing_cidrs[0]))), + _ => Ok(test_with::Completion::ignored_with(format!("because no interface ip in following cidr: \n{}\n", missing_cidrs.join(", ")))), + } + } + }, + (Some(_), ReturnType::Type(_, _)) => quote::quote! { + async fn #check_ident() -> Result { + let interface_ips: Vec = match test_with::local_ip_address::list_afinet_netifas() { + Ok(ifas) => ifas.into_iter().map(|(_, ip)| ip).collect(), + Err(_) => panic!("can not get the ip of the interfaces"), + }; + let mut missing_cidrs = vec![]; + #( + let net: test_with::ipnet::IpNet = #cidrs.parse().expect("CIDR is invalid"); + if !interface_ips.iter().any(|ip| net.contains(ip)) { + missing_cidrs.push(#cidrs); + } + )* + match missing_cidrs.len() { + 0 => { + if let Err(e) = #ident().await { + Err(format!("{e:?}").into()) + } else { + Ok(test_with::Completion::Completed) + } + }, + 1 => Ok(test_with::Completion::ignored_with(format!("because no interface ip in {}", missing_cidrs[0]))), + _ => Ok(test_with::Completion::ignored_with(format!("because no interface ip in following cidr: \n{}\n", missing_cidrs.join(", ")))), + } + } + }, + (None, _) => quote::quote! { + fn #check_ident() -> Result { + let interface_ips: Vec = match test_with::local_ip_address::list_afinet_netifas() { + Ok(ifas) => ifas.into_iter().map(|(_, ip)| ip).collect(), + Err(_) => panic!("can not get the ip of the interfaces"), + }; + let mut missing_cidrs = vec![]; + #( + let net: test_with::ipnet::IpNet = #cidrs.parse().expect("CIDR is invalid"); + if !interface_ips.iter().any(|ip| net.contains(ip)) { + missing_cidrs.push(#cidrs); + } + )* + match missing_cidrs.len() { + 0 => { + #ident(); + Ok(test_with::Completion::Completed) + }, + 1 => Ok(test_with::Completion::ignored_with(format!("because no interface ip in {}", missing_cidrs[0]))), + _ => Ok(test_with::Completion::ignored_with(format!("because no interface ip in following cidr: \n{}\n", missing_cidrs.join(", ")))), + } + } + }, + }; + + quote::quote! { + #check_fn + #(#attrs)* + #vis #sig #block + } + .into() +} diff --git a/examples-with-runner/Cargo.toml b/examples-with-runner/Cargo.toml index d110068..5d88e7b 100644 --- a/examples-with-runner/Cargo.toml +++ b/examples-with-runner/Cargo.toml @@ -7,5 +7,5 @@ license.workspace = true repository.workspace = true [dependencies] -test-with = { path = "../lib", features = ["runtime", "net", "resource", "user", "executable", "timezone"] } +test-with = { path = "../lib", features = ["runtime", "net", "ip", "resource", "user", "executable", "timezone"] } tokio = "1.45.1" diff --git a/examples-with-runner/examples/ip.rs b/examples-with-runner/examples/ip.rs new file mode 100644 index 0000000..b494e52 --- /dev/null +++ b/examples-with-runner/examples/ip.rs @@ -0,0 +1,40 @@ +test_with::runner!(ip); + +#[test_with::module] +mod ip { + // Run only when one of the interface ip is in 127.0.0.0/8 (loopback always present) + #[test_with::runtime_ip_in(127.0.0.0/8)] + fn test_works_with_loopback() { + assert!(true); + } + + // Ignored because no interface ip should be in this documentation-only range + #[test_with::runtime_ip_in(203.0.113.0/24)] + fn test_ignored_without_interface_ip() { + panic!("should be ignored") + } + + // Run only when the public ip can be got from https://ip.me (default check site) + #[test_with::runtime_public_ip] + fn test_works_with_public_ip() { + assert!(true); + } + + // Override the check site (url has to be a string literal) + #[test_with::runtime_public_ip(ip_check_site = "https://ifconfig.me/ip")] + fn test_works_with_public_ip_other_site() { + assert!(true); + } + + // Ignored because the public ip should not be in this documentation-only range + #[test_with::runtime_public_ip_in(203.0.113.0/24)] + fn test_ignored_public_ip_not_in_cidr() { + panic!("should be ignored") + } + + // Ignored because the public ip should not be this documentation-only ip + #[test_with::runtime_public_ip_is(203.0.113.1)] + fn test_ignored_public_ip_is_not() { + panic!("should be ignored") + } +} diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 54dfb82..df1456e 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -22,6 +22,8 @@ num_cpus = { version = "1.13", optional = true } which = { version = "8.0", optional = true } chrono = { version = "0.4", optional = true } libtest-mimic = { version = "0.8.2", optional = true } +ipnet = { version = "2", optional = true } +local-ip-address = { version = "0.6", optional = true } [target.'cfg(not(target_os = "windows"))'.dependencies] uzers = { version = "0.12", optional = true } @@ -34,6 +36,7 @@ runtime = ["test-with-derive/runtime", "libtest-mimic"] net = ["test-with-derive/net", "http", "icmp"] http = ["test-with-derive/http", "reqwest"] icmp = ["test-with-derive/icmp", "ping"] +ip = ["test-with-derive/ip", "ipnet", "local-ip-address", "reqwest"] resource = ["test-with-derive/resource", "sysinfo", "byte-unit", "num_cpus"] user = ["test-with-derive/user", "uzers"] diff --git a/lib/src/lib.rs b/lib/src/lib.rs index b00675a..0bacc6c 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -25,7 +25,9 @@ //! features in `Cargo.toml` //! [macro@runner] and [macro@module] are for the basic skeleton of the test runner. //! [macro@runtime_env], [macro@runtime_no_env], [macro@runtime_file], [macro@runtime_path], -//! [macro@runtime_http], [macro@runtime_https], [macro@runtime_icmp], [macro@runtime_tcp], +//! [macro@runtime_http], [macro@runtime_https], [macro@runtime_icmp], [macro@runtime_ip_in], +//! [macro@runtime_public_ip], [macro@runtime_public_ip_in], [macro@runtime_public_ip_is], +//! [macro@runtime_tcp], //! [macro@runtime_root], [macro@runtime_group], [macro@runtime_user], [macro@runtime_mem], //! [macro@runtime_free_mem], [macro@runtime_available_mem], [macro@runtime_swap], //! [macro@runtime_free_swap], [macro@runtime_available_swap], [macro@runtime_cpu_core], @@ -60,11 +62,15 @@ pub use libtest_mimic::*; pub use byte_unit; #[cfg(all(feature = "runtime", feature = "timezone"))] pub use chrono; +#[cfg(all(feature = "runtime", feature = "ip"))] +pub use ipnet; +#[cfg(all(feature = "runtime", feature = "ip"))] +pub use local_ip_address; #[cfg(all(feature = "runtime", feature = "resource"))] pub use num_cpus; #[cfg(all(feature = "runtime", feature = "icmp"))] pub use ping; -#[cfg(all(feature = "runtime", feature = "http"))] +#[cfg(all(feature = "runtime", any(feature = "http", feature = "ip")))] pub use reqwest; #[cfg(all(feature = "runtime", feature = "resource"))] pub use sysinfo; From fbd4d8a591466179979cdd86b8901f3ccfd392bd Mon Sep 17 00:00:00 2001 From: Antonio Yang Date: Sun, 26 Jul 2026 10:33:54 +0800 Subject: [PATCH 2/3] update syn 3.0 --- Cargo.lock | 927 ++++++++++++++++++--------------------- derive/Cargo.toml | 2 +- derive/src/env.rs | 2 + derive/src/executable.rs | 1 + derive/src/file.rs | 2 + derive/src/http.rs | 2 + derive/src/icmp.rs | 9 +- derive/src/lib.rs | 6 +- derive/src/resource.rs | 6 + derive/src/runtime_ip.rs | 4 + derive/src/socket.rs | 1 + derive/src/timezone.rs | 1 + derive/src/user.rs | 3 + derive/src/utils.rs | 3 + 14 files changed, 454 insertions(+), 515 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 04506f8..df5c7e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -31,21 +31,6 @@ dependencies = [ "libc", ] -[[package]] -name = "anstream" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" -dependencies = [ - "anstyle", - "anstyle-parse 0.2.7", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - [[package]] name = "anstream" version = "1.0.0" @@ -53,7 +38,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", - "anstyle-parse 1.0.0", + "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", @@ -63,18 +48,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" -dependencies = [ - "utf8parse", -] +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" @@ -107,9 +83,9 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56" [[package]] name = "atomic-waker" @@ -119,15 +95,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "aws-lc-rs" -version = "1.15.4" +version = "1.17.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b7b6141e96a8c160799cc2d5adecd5cbbe5054cb8c7c4af53da0f83bb7ad256" +checksum = "00bdb5da18dac48ca2cc7cd4a98e533e8635a58e2361d13a1a4ee3888e0d72f1" dependencies = [ "aws-lc-sys", "zeroize", @@ -135,14 +111,15 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.37.0" +version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c34dda4df7017c8db52132f0f8a2e0f8161649d15723ed63fc00c82d0f2081a" +checksum = "43103168cc76fe62678a375e722fc9cb3a0146159ac5828bc4f0dfd755c2224c" dependencies = [ "cc", "cmake", "dunce", "fs_extra", + "pkg-config", ] [[package]] @@ -153,15 +130,15 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" -version = "2.10.0" +version = "2.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" [[package]] name = "bitvec" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +checksum = "ddcec3d12c579d40898fe0a9a358a803c23e9c52ca3c425707f81c9436211837" dependencies = [ "funty", "radium", @@ -171,19 +148,20 @@ dependencies = [ [[package]] name = "borsh" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" +checksum = "a88b7ea17d208c4193f2c1e6de3c35fe71f98c96982d5ced308bdcc749ff6e1f" dependencies = [ "borsh-derive", + "bytes", "cfg_aliases", ] [[package]] name = "borsh-derive" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" +checksum = "d8f347189c62a579b8cd5f80714efa178f52e461dc2e6d701d264f5ff22e566c" dependencies = [ "once_cell", "proc-macro-crate", @@ -194,9 +172,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.1" +version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "byte-unit" @@ -240,15 +218,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.11.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "cc" -version = "1.2.54" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" +checksum = "5add81bb678e6cb321aff7fa0dc7689ad82b112dbc032cea19f91d6b8e3582b9" dependencies = [ "find-msvc-tools", "jobserver", @@ -256,12 +234,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - [[package]] name = "cfg-if" version = "1.0.4" @@ -270,9 +242,20 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cfg_aliases" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527" + +[[package]] +name = "chacha20" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core 0.10.1", +] [[package]] name = "chrono" @@ -289,9 +272,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.55" +version = "4.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e34525d5bbbd55da2bb745d34b36121baac88d07619a9a09cfcf4a6c0832785" +checksum = "d91e0c145792ef73a6ad36d27c75ac09f1832222a3c209689d90f534685ee5b7" dependencies = [ "clap_builder", "clap_derive", @@ -299,11 +282,11 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.55" +version = "4.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a20016a20a3da95bef50ec7238dbd09baeef4311dcdd38ec15aba69812fb61" +checksum = "f09628afdcc538b57f3c6341e9c8e9970f18e4a481690a64974d7023bd33548b" dependencies = [ - "anstream 0.6.21", + "anstream", "anstyle", "clap_lex", "strsim", @@ -311,36 +294,36 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.55" +version = "4.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] name = "clap_lex" -version = "0.7.7" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "cmake" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" dependencies = [ "cc", ] [[package]] name = "colorchoice" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "combine" @@ -378,6 +361,15 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "darling" version = "0.20.11" @@ -456,9 +448,9 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" dependencies = [ "proc-macro2", "quote", @@ -506,9 +498,9 @@ checksum = "5692dd7b5a1978a5aeb0ce83b7655c58ca8efdcb79d21036ea249da95afec2c6" [[package]] name = "find-msvc-tools" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fnv" @@ -539,9 +531,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" dependencies = [ "futures-core", "futures-sink", @@ -549,15 +541,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" [[package]] name = "futures-executor" -version = "0.3.31" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458" dependencies = [ "futures-core", "futures-task", @@ -566,15 +558,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.31" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" [[package]] name = "futures-macro" -version = "0.3.31" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" dependencies = [ "proc-macro2", "quote", @@ -583,27 +575,27 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" [[package]] name = "futures-timer" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" dependencies = [ "futures-core", "futures-io", @@ -612,7 +604,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -636,10 +627,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "js-sys", "libc", - "r-efi", + "r-efi 5.3.0", "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", "wasm-bindgen", ] @@ -656,15 +659,15 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" [[package]] name = "h2" -version = "0.4.13" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" dependencies = [ "atomic-waker", "bytes", @@ -690,9 +693,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.1" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" [[package]] name = "heck" @@ -708,9 +711,9 @@ checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c" [[package]] name = "http" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" dependencies = [ "bytes", "itoa", @@ -718,9 +721,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", "http", @@ -728,9 +731,9 @@ dependencies = [ [[package]] name = "http-body-util" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +checksum = "e9f41fd6a08e4d4ec69df65976da761afd5ad5e58a9d4acb46bd1c953a9e3ff2" dependencies = [ "bytes", "futures-core", @@ -747,9 +750,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" -version = "1.8.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" dependencies = [ "atomic-waker", "bytes", @@ -761,7 +764,6 @@ dependencies = [ "httparse", "itoa", "pin-project-lite", - "pin-utils", "smallvec", "tokio", "want", @@ -769,15 +771,14 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.7" +version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ "http", "hyper", "hyper-util", "rustls", - "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", @@ -785,14 +786,13 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ "base64", "bytes", "futures-channel", - "futures-core", "futures-util", "http", "http-body", @@ -835,12 +835,13 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ "displaydoc", "potential_utf", + "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -848,9 +849,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", @@ -861,9 +862,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -875,15 +876,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" [[package]] name = "icu_properties" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" dependencies = [ "icu_collections", "icu_locale_core", @@ -895,15 +896,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", @@ -933,9 +934,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -943,29 +944,19 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.13.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown 0.17.1", ] [[package]] name = "ipnet" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" - -[[package]] -name = "iri-string" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" -dependencies = [ - "memchr", - "serde", -] +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "is_terminal_polyfill" @@ -975,57 +966,85 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jni" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" dependencies = [ - "cesu8", "cfg-if", "combine", + "jni-macros", "jni-sys", "log", - "thiserror 1.0.69", + "simd_cesu8", + "thiserror", "walkdir", - "windows-sys 0.45.0", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.119", ] [[package]] name = "jni-sys" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] [[package]] name = "jobserver" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3" dependencies = [ - "getrandom 0.3.4", + "getrandom 0.4.3", "libc", ] [[package]] name = "js-sys" -version = "0.3.85" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" dependencies = [ - "once_cell", + "cfg-if", + "futures-util", "wasm-bindgen", ] [[package]] name = "libc" -version = "0.2.180" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "libtest-mimic" @@ -1033,7 +1052,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14e6ba06f0ade6e504aff834d7c34298e5155c6baca353cc6a4aaff2f9fd7f33" dependencies = [ - "anstream 1.0.0", + "anstream", "anstyle", "clap", "escape8259", @@ -1041,9 +1060,9 @@ dependencies = [ [[package]] name = "litemap" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "local-ip-address" @@ -1067,9 +1086,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.29" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "lru-slab" @@ -1079,9 +1098,9 @@ checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "mime" @@ -1091,9 +1110,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mio" -version = "1.1.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427" dependencies = [ "libc", "wasi", @@ -1131,9 +1150,9 @@ dependencies = [ [[package]] name = "ntapi" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c70f219e21142367c70c0b30c6a9e3a14d55b4d12a204d897fbec83a0363f081" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" dependencies = [ "winapi", ] @@ -1216,9 +1235,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "once_cell_polyfill" @@ -1263,15 +1282,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "ping" @@ -1279,16 +1292,22 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7704264c7d31443a8dc10dcb3301457980be49b9e5bffef7a41fd0e7c0f4e823" dependencies = [ - "rand 0.9.2", + "rand 0.9.5", "socket2", - "thiserror 2.0.18", + "thiserror", ] +[[package]] +name = "pkg-config" +version = "0.3.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" + [[package]] name = "potential_utf" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ "zerovec", ] @@ -1304,9 +1323,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ "toml_edit", ] @@ -1342,9 +1361,9 @@ dependencies = [ [[package]] name = "quinn" -version = "0.11.9" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" dependencies = [ "bytes", "cfg_aliases", @@ -1354,7 +1373,7 @@ dependencies = [ "rustc-hash", "rustls", "socket2", - "thiserror 2.0.18", + "thiserror", "tokio", "tracing", "web-time", @@ -1362,21 +1381,22 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.13" +version = "0.11.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560" dependencies = [ "aws-lc-rs", "bytes", - "getrandom 0.3.4", + "getrandom 0.4.3", "lru-slab", - "rand 0.9.2", + "rand 0.10.2", + "rand_pcg", "ring", "rustc-hash", "rustls", "rustls-pki-types", "slab", - "thiserror 2.0.18", + "thiserror", "tinyvec", "tracing", "web-time", @@ -1384,16 +1404,16 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.14" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +checksum = "35a133f956daabe89a61a685c2649f13d82d5aa4bd5d12d1277e1072a21c0694" dependencies = [ "cfg_aliases", "libc", "once_cell", "socket2", "tracing", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -1411,6 +1431,12 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + [[package]] name = "radium" version = "0.7.0" @@ -1419,9 +1445,9 @@ checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "rand" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" dependencies = [ "libc", "rand_chacha 0.3.1", @@ -1430,14 +1456,25 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.5", ] +[[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -1476,6 +1513,21 @@ dependencies = [ "getrandom 0.3.4", ] +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + [[package]] name = "redox_syscall" version = "0.5.18" @@ -1487,22 +1539,22 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] @@ -1663,25 +1715,26 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.40.0" +version = "1.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61f703d19852dbf87cbc513643fa81428361eb6940f1ac14fd58155d295a3eb0" +checksum = "be2a24f50780bc85f09cc6ac299bdf1424302742d77221106859c9d8b102126a" dependencies = [ "arrayvec", "borsh", "bytes", "num-traits", - "rand 0.8.5", + "rand 0.8.7", "rkyv", "serde", "serde_json", + "wasm-bindgen", ] [[package]] name = "rustc-hash" -version = "2.1.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" [[package]] name = "rustc_version" @@ -1694,9 +1747,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.36" +version = "0.23.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +checksum = "3c54fcab019b409d04215d3a17cb438fd7fbf192ee61461f20f4fe18704bc138" dependencies = [ "aws-lc-rs", "once_cell", @@ -1708,9 +1761,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" +checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" dependencies = [ "openssl-probe", "rustls-pki-types", @@ -1720,9 +1773,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.14.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" dependencies = [ "web-time", "zeroize", @@ -1730,9 +1783,9 @@ dependencies = [ [[package]] name = "rustls-platform-verifier" -version = "0.6.2" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" dependencies = [ "core-foundation 0.10.1", "core-foundation-sys", @@ -1757,9 +1810,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.9" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "aws-lc-rs", "ring", @@ -1769,9 +1822,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "same-file" @@ -1784,18 +1837,18 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" dependencies = [ "windows-sys 0.61.2", ] [[package]] name = "schemars" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e910108742c57a770f492731f99be216a52fadd361b06c8fb59d74ccc267d2" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" dependencies = [ "dyn-clone", "ref-cast", @@ -1817,9 +1870,9 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "security-framework" -version = "3.5.1" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ "bitflags", "core-foundation 0.10.1", @@ -1830,9 +1883,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.15.0" +version = "2.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" dependencies = [ "core-foundation-sys", "libc", @@ -1840,15 +1893,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", "serde_derive", @@ -1856,29 +1909,29 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" dependencies = [ "itoa", "memchr", @@ -1914,9 +1967,19 @@ dependencies = [ [[package]] name = "shlex" -version = "1.3.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] [[package]] name = "simdutf8" @@ -1926,24 +1989,24 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "slab" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" -version = "1.15.1" +version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" [[package]] name = "socket2" -version = "0.6.2" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -1986,6 +2049,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "1.0.2" @@ -2023,9 +2097,9 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" dependencies = [ "bitflags", "core-foundation 0.9.4", @@ -2081,7 +2155,7 @@ dependencies = [ "quote", "regex", "reqwest", - "syn 2.0.119", + "syn 3.0.3", "sysinfo", "uzers", "which", @@ -2097,49 +2171,29 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.69" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" -dependencies = [ - "thiserror-impl 2.0.18", + "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.69" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] name = "tinystr" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", "zerovec", @@ -2147,9 +2201,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f" dependencies = [ "tinyvec_macros", ] @@ -2162,9 +2216,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.50.0" +version = "1.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" dependencies = [ "bytes", "libc", @@ -2177,9 +2231,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "6328af13490e73a9b4694030fafd93f8c8c6a9dede33e821c3fc63eddf8042ba" dependencies = [ "proc-macro2", "quote", @@ -2198,31 +2252,32 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" dependencies = [ "bytes", "futures-core", "futures-sink", + "libc", "pin-project-lite", "tokio", ] [[package]] name = "toml_datetime" -version = "0.7.5+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.23.10+spec-1.0.0" +version = "0.25.13+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b" dependencies = [ "indexmap", "toml_datetime", @@ -2232,9 +2287,9 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.0.6+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ "winnow", ] @@ -2256,20 +2311,20 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ "bitflags", "bytes", "futures-util", "http", "http-body", - "iri-string", "pin-project-lite", "tower", "tower-layer", "tower-service", + "url", ] [[package]] @@ -2311,9 +2366,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "unicode-ident" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "untrusted" @@ -2335,9 +2390,9 @@ dependencies = [ [[package]] name = "utf8-width" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1292c0d970b54115d14f2492fe0170adf21d68a1de108eebc51c1df4f346a091" +checksum = "159a7cadce548703edd50d24069bc294c5415ecab0a480e0cd1ca06d112dc94a" [[package]] name = "utf8_iter" @@ -2353,9 +2408,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.20.0" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" +checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" dependencies = [ "js-sys", "wasm-bindgen", @@ -2404,18 +2459,18 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.2+wasi-0.2.9" +version = "1.0.4+wasi-0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" dependencies = [ "cfg-if", "once_cell", @@ -2426,23 +2481,19 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.58" +version = "0.4.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" dependencies = [ - "cfg-if", - "futures-util", "js-sys", - "once_cell", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2450,9 +2501,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" dependencies = [ "bumpalo", "proc-macro2", @@ -2463,18 +2514,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.85" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" dependencies = [ "js-sys", "wasm-bindgen", @@ -2492,9 +2543,9 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a29fc0408b113f68cf32637857ab740edfafdf460c326cd2afaa2d84cc05dc" +checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" dependencies = [ "rustls-pki-types", ] @@ -2651,31 +2702,13 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 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.5", + "windows-targets", ] [[package]] @@ -2687,52 +2720,20 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "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.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] @@ -2744,164 +2745,74 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - [[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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" 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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" 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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - [[package]] name = "winnow" -version = "0.7.14" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" dependencies = [ "memchr", ] [[package]] name = "wit-bindgen" -version = "0.51.0" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "wyz" @@ -2914,9 +2825,9 @@ dependencies = [ [[package]] name = "yoke" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -2925,9 +2836,9 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", @@ -2937,18 +2848,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.35" +version = "0.8.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdea86ddd5568519879b8187e1cf04e24fce28f7fe046ceecbce472ff19a2572" +checksum = "b5a105cd7b140f6eeec8acff2ea38135d3cab283ada58540f629fe51e46696eb" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.35" +version = "0.8.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c15e1b46eff7c6c91195752e0eeed8ef040e391cdece7c25376957d5f15df22" +checksum = "0fe976fb70c78cd64cccfe3a6fc142244e8a77b70959b30faf9d0ac37ee228eb" dependencies = [ "proc-macro2", "quote", @@ -2957,18 +2868,18 @@ dependencies = [ [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", @@ -2978,15 +2889,15 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.8.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +checksum = "e13c156562582aa81c60cb29407084cdb54c4164760106ab78e6c5b0858cf64e" [[package]] name = "zerotrie" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -2995,9 +2906,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -3006,9 +2917,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", @@ -3017,6 +2928,6 @@ dependencies = [ [[package]] name = "zmij" -version = "1.0.17" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02aae0f83f69aafc94776e879363e9771d7ecbffe2c7fbb6c14c5e00dfe88439" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 2a0d1b5..e00858d 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -17,7 +17,7 @@ proc-macro = true [dependencies] proc-macro2 = "1.0" quote = "1.0" -syn = { version = "2.0", features = [ "full" ] } +syn = { version = "3.0", features = [ "full" ] } regex = { version = "1" } reqwest = { version = "0.13", features = ["blocking"], optional = true } diff --git a/derive/src/env.rs b/derive/src/env.rs index 8a81bd3..fb1090c 100644 --- a/derive/src/env.rs +++ b/derive/src/env.rs @@ -40,6 +40,7 @@ pub(crate) fn runtime_env(attr: TokenStream, stream: TokenStream) -> TokenStream vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -147,6 +148,7 @@ pub(crate) fn runtime_no_env(attr: TokenStream, stream: TokenStream) -> TokenStr vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); diff --git a/derive/src/executable.rs b/derive/src/executable.rs index 87bf6ed..2b2279f 100644 --- a/derive/src/executable.rs +++ b/derive/src/executable.rs @@ -72,6 +72,7 @@ pub(crate) fn runtime_executable(attr: TokenStream, stream: TokenStream) -> Toke vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); diff --git a/derive/src/file.rs b/derive/src/file.rs index 8a8eabe..ee1d322 100644 --- a/derive/src/file.rs +++ b/derive/src/file.rs @@ -52,6 +52,7 @@ pub(crate) fn runtime_file(attr: TokenStream, stream: TokenStream) -> TokenStrea vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -135,6 +136,7 @@ pub(crate) fn runtime_path(attr: TokenStream, stream: TokenStream) -> TokenStrea vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); diff --git a/derive/src/http.rs b/derive/src/http.rs index aaa9cea..e05d417 100644 --- a/derive/src/http.rs +++ b/derive/src/http.rs @@ -52,6 +52,7 @@ pub(crate) fn runtime_http(attr: TokenStream, stream: TokenStream) -> TokenStrea vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -135,6 +136,7 @@ pub(crate) fn runtime_https(attr: TokenStream, stream: TokenStream) -> TokenStre vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); diff --git a/derive/src/icmp.rs b/derive/src/icmp.rs index f32a0b9..986aaf3 100644 --- a/derive/src/icmp.rs +++ b/derive/src/icmp.rs @@ -10,7 +10,7 @@ pub(crate) fn check_icmp_condition(attr_str: String) -> (bool, String) { let mut missing_ips = vec![]; for ip in ips.iter() { if let Ok(addr) = ip.parse::() { - if ping::ping(addr, None, None, None, None, None).is_err() { + if ping::Ping::new(addr).send().is_err() { missing_ips.push(ip.to_string()); } } else { @@ -37,6 +37,7 @@ pub(crate) fn runtime_icmp(attr: TokenStream, stream: TokenStream) -> TokenStrea vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -46,7 +47,7 @@ pub(crate) fn runtime_icmp(attr: TokenStream, stream: TokenStream) -> TokenStrea async fn #check_ident() -> Result { let mut missing_ips = vec![]; #( - if test_with::ping::ping(#ips.parse().expect("ip address is invalid"), None, None, None, None, None).is_err() { + if test_with::ping::Ping::new(#ips.parse().expect("ip address is invalid")).send().is_err() { missing_ips.push(#ips); } )* @@ -64,7 +65,7 @@ pub(crate) fn runtime_icmp(attr: TokenStream, stream: TokenStream) -> TokenStrea async fn #check_ident() -> Result { let mut missing_ips = vec![]; #( - if test_with::ping::ping(#ips.parse().expect("ip address is invalid"), None, None, None, None, None).is_err() { + if test_with::ping::Ping::new(#ips.parse().expect("ip address is invalid")).send().is_err() { missing_ips.push(#ips); } )* @@ -85,7 +86,7 @@ pub(crate) fn runtime_icmp(attr: TokenStream, stream: TokenStream) -> TokenStrea fn #check_ident() -> Result { let mut missing_ips = vec![]; #( - if test_with::ping::ping(#ips.parse().expect("ip address is invalid"), None, None, None, None, None).is_err() { + if test_with::ping::Ping::new(#ips.parse().expect("ip address is invalid")).send().is_err() { missing_ips.push(#ips); } )* diff --git a/derive/src/lib.rs b/derive/src/lib.rs index 3e29216..71695b2 100644 --- a/derive/src/lib.rs +++ b/derive/src/lib.rs @@ -674,7 +674,7 @@ pub fn runtime_tcp(attr: TokenStream, stream: TokenStream) -> TokenStream { /// } /// ``` #[proc_macro_attribute] -#[cfg(all(feature = "user"))] +#[cfg(feature = "user")] pub fn root(attr: TokenStream, stream: TokenStream) -> TokenStream { if is_module(&stream) { mod_macro( @@ -729,7 +729,7 @@ pub fn runtime_root(attr: TokenStream, stream: TokenStream) -> TokenStream { /// } /// ``` #[proc_macro_attribute] -#[cfg(all(feature = "user"))] +#[cfg(feature = "user")] pub fn group(attr: TokenStream, stream: TokenStream) -> TokenStream { if is_module(&stream) { mod_macro( @@ -992,6 +992,7 @@ pub fn runtime_swap(attr: TokenStream, stream: TokenStream) -> TokenStream { vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -1312,6 +1313,7 @@ pub fn runtime_ignore_if(attr: TokenStream, stream: TokenStream) -> TokenStream vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); diff --git a/derive/src/resource.rs b/derive/src/resource.rs index 7a3bf75..b459a8a 100644 --- a/derive/src/resource.rs +++ b/derive/src/resource.rs @@ -78,6 +78,7 @@ pub(crate) fn runtime_mem(attr: TokenStream, stream: TokenStream) -> TokenStream vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -167,6 +168,7 @@ pub(crate) fn runtime_free_mem(attr: TokenStream, stream: TokenStream) -> TokenS vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -256,6 +258,7 @@ pub(crate) fn runtime_available_mem(attr: TokenStream, stream: TokenStream) -> T vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -345,6 +348,7 @@ pub(crate) fn runtime_free_swap(attr: TokenStream, stream: TokenStream) -> Token vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -437,6 +441,7 @@ pub(crate) fn runtime_cpu_core(attr: TokenStream, stream: TokenStream) -> TokenS vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -505,6 +510,7 @@ pub(crate) fn runtime_phy_cpu_core(attr: TokenStream, stream: TokenStream) -> To vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); diff --git a/derive/src/runtime_ip.rs b/derive/src/runtime_ip.rs index ffe727f..1605977 100644 --- a/derive/src/runtime_ip.rs +++ b/derive/src/runtime_ip.rs @@ -64,6 +64,7 @@ pub(crate) fn runtime_public_ip(attr: TokenStream, stream: TokenStream) -> Token vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -132,6 +133,7 @@ pub(crate) fn runtime_public_ip_in(attr: TokenStream, stream: TokenStream) -> To vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -215,6 +217,7 @@ pub(crate) fn runtime_public_ip_is(attr: TokenStream, stream: TokenStream) -> To vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -286,6 +289,7 @@ pub(crate) fn runtime_ip_in(attr: TokenStream, stream: TokenStream) -> TokenStre vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); diff --git a/derive/src/socket.rs b/derive/src/socket.rs index 92f82dc..71cfafe 100644 --- a/derive/src/socket.rs +++ b/derive/src/socket.rs @@ -33,6 +33,7 @@ pub(crate) fn runtime_tcp(attr: TokenStream, stream: TokenStream) -> TokenStream vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); diff --git a/derive/src/timezone.rs b/derive/src/timezone.rs index 534da1c..9a79ad3 100644 --- a/derive/src/timezone.rs +++ b/derive/src/timezone.rs @@ -84,6 +84,7 @@ pub(crate) fn runtime_timezone(attr: TokenStream, stream: TokenStream) -> TokenS vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); diff --git a/derive/src/user.rs b/derive/src/user.rs index b29490d..fbb025b 100644 --- a/derive/src/user.rs +++ b/derive/src/user.rs @@ -67,6 +67,7 @@ pub(crate) fn runtime_root(_attr: TokenStream, stream: TokenStream) -> TokenStre vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -133,6 +134,7 @@ pub(crate) fn runtime_group(attr: TokenStream, stream: TokenStream) -> TokenStre vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); @@ -241,6 +243,7 @@ pub fn runtime_user(attr: TokenStream, stream: TokenStream) -> TokenStream { vis, sig, block, + .. } = parse_macro_input!(stream as ItemFn); let syn::Signature { ident, .. } = sig.clone(); let check_ident = syn::Ident::new(&format!("_check_{ident}"), proc_macro2::Span::call_site()); diff --git a/derive/src/utils.rs b/derive/src/utils.rs index 83e63a8..51cc0ef 100644 --- a/derive/src/utils.rs +++ b/derive/src/utils.rs @@ -115,6 +115,7 @@ pub(crate) fn fn_macro( vis, mut sig, block, + .. } = input; #[cfg(not(feature = "ign-msg"))] let ItemFn { @@ -122,6 +123,7 @@ pub(crate) fn fn_macro( vis, sig, block, + .. } = input; let attr_str = attr.to_string().replace(' ', ""); let (all_var_exist, ignore_msg) = check_condition(attr_str); @@ -268,6 +270,7 @@ pub(crate) fn lock_macro(attr: TokenStream, input: ItemFn) -> TokenStream { vis, sig, block, + .. } = input; let Block { stmts, .. } = *block; let attr_str = attr.to_string().replace(' ', ""); From 2e1122cbaa0d2356c4934c22326f3b3366ff9f0a Mon Sep 17 00:00:00 2001 From: Antonio Yang Date: Sun, 26 Jul 2026 10:41:09 +0800 Subject: [PATCH 3/3] bump 0.17.0 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- README.md | 2 +- lib/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index df5c7e4..cce0b7b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2124,7 +2124,7 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "test-with" -version = "0.16.4" +version = "0.17.0" dependencies = [ "byte-unit", "chrono", @@ -2145,7 +2145,7 @@ dependencies = [ [[package]] name = "test-with-derive" -version = "0.16.4" +version = "0.17.0" dependencies = [ "byte-unit", "chrono", diff --git a/Cargo.toml b/Cargo.toml index ec3e541..d929570 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = ["derive", "lib", "examples-with-runner"] resolver = "2" [workspace.package] -version = "0.16.4" +version = "0.17.0" authors = ["Antonio Yang "] edition = "2021" description = "A library that helps you run tests with conditions" diff --git a/README.md b/README.md index 0f673f3..e55dfa7 100644 --- a/README.md +++ b/README.md @@ -277,7 +277,7 @@ the test runner will treat it as the test in Rust and also provide the same summ The `runtime` feature should be enabled and include as normal dependency( not dev-dependencies). ```toml -test-with = { version = "0.16.4", features = ["runtime"] } +test-with = { version = "0.17.0", features = ["runtime"] } ``` Create an example with the following runtime macros (`test_with::runner!`, `#[test_with::module]`, `#[test_with::runtime_env()]`). diff --git a/lib/Cargo.toml b/lib/Cargo.toml index df1456e..fcb4941 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -12,7 +12,7 @@ rust-version.workspace = true readme.workspace = true [dependencies] -test-with-derive = { version = "=0.16.4", path = "../derive", default-features = false } +test-with-derive = { version = "=0.17.0", path = "../derive", default-features = false } reqwest = { version = "0.13", features = ["blocking"], optional = true } ping = { version = "0.9.0", optional = true }