From f6c37c01e93d7114304a7e3705e0a2cbd954c99c Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 21 Dec 2025 11:42:41 +0100 Subject: [PATCH 1/3] chore: remove `kdl` and `miette` crates and use `kdlite` as a replacement --- Cargo.lock | 213 +---- Cargo.toml | 2 +- ferron-yaml2kdl-core/Cargo.toml | 2 +- ferron-yaml2kdl-core/src/lib.rs | 999 +++++++++++++++------- ferron/Cargo.toml | 4 +- ferron/src/config/adapters/kdl.rs | 194 +++-- ferron/src/config/adapters/yaml_legacy.rs | 351 ++++---- 7 files changed, 1029 insertions(+), 736 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ccb94a4d..0f4632b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -673,15 +673,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "backtrace-ext" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537beee3be4a18fb023b570f80e3ae28003db9167a751266b259926e25539d50" -dependencies = [ - "backtrace", -] - [[package]] name = "base64" version = "0.22.1" @@ -932,7 +923,7 @@ version = "4.5.49" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn", @@ -1284,7 +1275,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", "syn", @@ -1373,8 +1364,7 @@ dependencies = [ "hyper-rustls", "hyper-util", "instant-acme", - "kdl", - "miette", + "kdlite", "mimalloc", "monoio", "monoio-compat", @@ -1394,6 +1384,7 @@ dependencies = [ "shadow-rs", "shiba", "smallvec", + "snailquote", "socket2 0.6.1", "tokio", "tokio-rustls", @@ -1571,7 +1562,7 @@ dependencies = [ "anyhow", "glob", "hashlink", - "kdl", + "kdlite", "yaml-rust2", ] @@ -1859,12 +1850,6 @@ dependencies = [ "hashbrown 0.16.1", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -2343,12 +2328,6 @@ dependencies = [ "serde", ] -[[package]] -name = "is_ci" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" - [[package]] name = "is_debug" version = "1.1.0" @@ -2428,15 +2407,10 @@ dependencies = [ ] [[package]] -name = "kdl" -version = "6.5.0" +name = "kdlite" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a29e7b50079ff44549f68c0becb1c73d7f6de2a4ea952da77966daf3d4761e" -dependencies = [ - "miette", - "num", - "winnow 0.6.24", -] +checksum = "92fec2005a8cff787f987380d001fe74db389b4387366fa41536e54810de861e" [[package]] name = "lazy_static" @@ -2518,36 +2492,6 @@ version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" -[[package]] -name = "miette" -version = "7.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7" -dependencies = [ - "backtrace", - "backtrace-ext", - "cfg-if", - "miette-derive", - "owo-colors", - "supports-color", - "supports-hyperlinks", - "supports-unicode", - "terminal_size", - "textwrap", - "unicode-width 0.1.14", -] - -[[package]] -name = "miette-derive" -version = "7.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "mimalloc" version = "0.1.48" @@ -2696,20 +2640,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - [[package]] name = "num-bigint" version = "0.4.6" @@ -2720,15 +2650,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-complex" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" -dependencies = [ - "num-traits", -] - [[package]] name = "num-conv" version = "0.1.0" @@ -2744,28 +2665,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -3126,12 +3025,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" -[[package]] -name = "owo-colors" -version = "4.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c6901729fa79e91a0913333229e9ca5dc725089d1c363b2f4b4760709dc4a52" - [[package]] name = "parking" version = "2.2.1" @@ -4194,12 +4087,22 @@ version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "syn", ] +[[package]] +name = "snailquote" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec62a949bda7f15800481a711909f946e1204f2460f89210eaf7f57730f88f86" +dependencies = [ + "thiserror 1.0.69", + "unicode_categories", +] + [[package]] name = "socket2" version = "0.5.10" @@ -4238,27 +4141,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "supports-color" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fc7232dd8d2e4ac5ce4ef302b1d81e0b80d055b9d77c7c4f51f6aa4c867d6" -dependencies = [ - "is_ci", -] - -[[package]] -name = "supports-hyperlinks" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e396b6523b11ccb83120b115a0b7366de372751aa6edf19844dfb13a6af97e91" - -[[package]] -name = "supports-unicode" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" - [[package]] name = "syn" version = "2.0.111" @@ -4323,26 +4205,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" -[[package]] -name = "terminal_size" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b8cb979cb11c32ce1603f8137b22262a9d131aaa5c37b5678025f22b8becd0" -dependencies = [ - "rustix", - "windows-sys 0.60.2", -] - -[[package]] -name = "textwrap" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" -dependencies = [ - "unicode-linebreak", - "unicode-width 0.2.2", -] - [[package]] name = "thiserror" version = "1.0.69" @@ -4547,7 +4409,7 @@ dependencies = [ "toml_datetime", "toml_parser", "toml_writer", - "winnow 0.7.14", + "winnow", ] [[package]] @@ -4565,7 +4427,7 @@ version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ - "winnow 0.7.14", + "winnow", ] [[package]] @@ -4747,30 +4609,18 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" -[[package]] -name = "unicode-linebreak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" - -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - -[[package]] -name = "unicode-width" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" - [[package]] name = "unicode-xid" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + [[package]] name = "untrusted" version = "0.7.1" @@ -5358,15 +5208,6 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" -[[package]] -name = "winnow" -version = "0.6.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" -dependencies = [ - "memchr", -] - [[package]] name = "winnow" version = "0.7.14" diff --git a/Cargo.toml b/Cargo.toml index ff4e48dd..47dad79d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ exclude = ["build-prepare", "build-installer", "dockertest"] resolver = "2" [workspace.dependencies] -kdl = "6.3.4" +kdlite = "0.1.1" mimalloc = "0.1.46" password-auth = { version = "1.0.0", features = ["pbkdf2", "argon2", "scrypt"] } shiba = "0.1.1" diff --git a/ferron-yaml2kdl-core/Cargo.toml b/ferron-yaml2kdl-core/Cargo.toml index bbbb7257..6bccdb25 100644 --- a/ferron-yaml2kdl-core/Cargo.toml +++ b/ferron-yaml2kdl-core/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" anyhow = "1.0.98" glob = "0.3.2" hashlink = "0.11.0" -kdl = { workspace = true } +kdlite = { workspace = true } yaml-rust2 = "0.11.0" diff --git a/ferron-yaml2kdl-core/src/lib.rs b/ferron-yaml2kdl-core/src/lib.rs index d4d0d42f..7abbe7e7 100644 --- a/ferron-yaml2kdl-core/src/lib.rs +++ b/ferron-yaml2kdl-core/src/lib.rs @@ -1,18 +1,19 @@ use std::{collections::HashMap, error::Error, path::PathBuf}; use hashlink::LinkedHashMap; -use kdl::{KdlDocument, KdlEntry, KdlNode, KdlValue}; use load_config::load_config; use yaml_rust2::Yaml; mod load_config; /// Converts Ferron 1.x YAML configuration to Ferron 2.x KDL configuration -pub fn convert_yaml_to_kdl(input_path: PathBuf) -> Result> { +pub fn convert_yaml_to_kdl( + input_path: PathBuf, +) -> Result, Box> { let yaml_configuration = load_config(input_path)?; - let mut kdl_configuration = KdlDocument::new(); + let mut kdl_configuration = kdlite::dom::Document::new(); - let kdl_configuration_nodes = kdl_configuration.nodes_mut(); + let kdl_configuration_nodes = &mut kdl_configuration.nodes; let (global_configuration, sni_configurations, load_server_modules, secure_port) = obtain_global_configuration(&yaml_configuration); kdl_configuration_nodes.push(global_configuration); @@ -23,22 +24,14 @@ pub fn convert_yaml_to_kdl(input_path: PathBuf) -> Result Result, -) -> (KdlDocument, Option) { +) -> (kdlite::dom::Document<'static>, Option>) { let empty_hashmap = yaml_rust2::yaml::Hash::new(); let yaml_properties = yaml_subconfiguration.as_hash().unwrap_or(&empty_hashmap); - let mut kdl_config = KdlDocument::new(); - let mut kdl_secure_config = KdlDocument::new(); + let mut kdl_config = kdlite::dom::Document::new(); + let mut kdl_secure_config = kdlite::dom::Document::new(); - let kdl_config_nodes = kdl_config.nodes_mut(); - let kdl_secure_config_nodes = kdl_secure_config.nodes_mut(); + let kdl_config_nodes = &mut kdl_config.nodes; + let kdl_secure_config_nodes = &mut kdl_secure_config.nodes; let mut scgi_to = "tcp://localhost:4000/"; let mut scgi_path = None; @@ -121,14 +104,22 @@ pub fn obtain_host_configuration( if let Some(location_path) = location["path"].as_str() { let (location_config, secure_location_config_option) = obtain_host_configuration(location, loaded_modules, &mut custom_headers.clone()); - let mut kdl_location = KdlNode::new("location"); - kdl_location.push(KdlValue::String(location_path.to_string())); - kdl_location.set_children(location_config); + let mut kdl_location = kdlite::dom::Node::new("location"); + kdl_location + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(location_path.to_string()), + ))); + kdl_location.children = Some(location_config); kdl_config_nodes.insert(0, kdl_location); if let Some(secure_location_config) = secure_location_config_option { - let mut kdl_location = KdlNode::new("location"); - kdl_location.push(KdlValue::String(location_path.to_string())); - kdl_location.set_children(secure_location_config); + let mut kdl_location = kdlite::dom::Node::new("location"); + kdl_location + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(location_path.to_string()), + ))); + kdl_location.children = Some(secure_location_config); kdl_secure_config_nodes.insert(0, kdl_location); } } @@ -140,18 +131,26 @@ pub fn obtain_host_configuration( for error_config in error_configs.iter().rev() { let (error_config_d, secure_error_config_d_option) = obtain_host_configuration(error_config, loaded_modules, &mut custom_headers.clone()); - let mut kdl_error_config = KdlNode::new("error_config"); + let mut kdl_error_config = kdlite::dom::Node::new("error_config"); if let Some(status_code) = error_config["scode"].as_i64() { - kdl_error_config.push(KdlValue::Integer(status_code as i128)); + kdl_error_config + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + status_code as i128, + ))); } - kdl_error_config.set_children(error_config_d); + kdl_error_config.children = Some(error_config_d); kdl_config_nodes.insert(0, kdl_error_config); if let Some(secure_error_config_d) = secure_error_config_d_option { - let mut kdl_error_config = KdlNode::new("error_config"); + let mut kdl_error_config = kdlite::dom::Node::new("error_config"); if let Some(status_code) = error_config["scode"].as_i64() { - kdl_error_config.push(KdlValue::Integer(status_code as i128)); + kdl_error_config + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + status_code as i128, + ))); } - kdl_error_config.set_children(secure_error_config_d); + kdl_error_config.children = Some(secure_error_config_d); kdl_config_nodes.insert(0, kdl_error_config); } } @@ -159,8 +158,12 @@ pub fn obtain_host_configuration( } "serverAdministratorEmail" => { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("server_administrator_email"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("server_administrator_email"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_config_nodes.push(kdl_property); } } @@ -177,36 +180,44 @@ pub fn obtain_host_configuration( } "disableToHTTPSRedirect" => { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("no_redirect_to_https"); + let mut kdl_property = kdlite::dom::Node::new("no_redirect_to_https"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } } "wwwredirect" => { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("wwwredirect"); + let mut kdl_property = kdlite::dom::Node::new("wwwredirect"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } } "enableIPSpoofing" => { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("trust_x_forwarded_for"); + let mut kdl_property = kdlite::dom::Node::new("trust_x_forwarded_for"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } } "allowDoubleSlashes" => { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("allow_double_slashes"); + let mut kdl_property = kdlite::dom::Node::new("allow_double_slashes"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } @@ -216,20 +227,38 @@ pub fn obtain_host_configuration( for value in value { if let Some(regex) = value["regex"].as_str() { if let Some(replacement) = value["replacement"].as_str() { - let mut kdl_property = KdlNode::new("rewrite"); - kdl_property.push(KdlValue::String(regex.to_string())); - kdl_property.push(KdlValue::String(replacement.to_string())); + let mut kdl_property = kdlite::dom::Node::new("rewrite"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(regex.to_string()), + ))); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(replacement.to_string()), + ))); if let Some(value) = value["isNotFile"].as_bool() { - kdl_property.push(KdlEntry::new_prop("file", KdlValue::Bool(!value))); + kdl_property + .entries + .push(kdlite::dom::Entry::new_prop("file", kdlite::dom::Value::Bool(!value))); } if let Some(value) = value["isNotDirectory"].as_bool() { - kdl_property.push(KdlEntry::new_prop("directory", KdlValue::Bool(!value))); + kdl_property.entries.push(kdlite::dom::Entry::new_prop( + "directory", + kdlite::dom::Value::Bool(!value), + )); } if let Some(value) = value["allowDoubleSlashes"].as_bool() { - kdl_property.push(KdlEntry::new_prop("allow_double_slashes", KdlValue::Bool(value))); + kdl_property.entries.push(kdlite::dom::Entry::new_prop( + "allow_double_slashes", + kdlite::dom::Value::Bool(value), + )); } if let Some(value) = value["last"].as_bool() { - kdl_property.push(KdlEntry::new_prop("last", KdlValue::Bool(value))); + kdl_property + .entries + .push(kdlite::dom::Entry::new_prop("last", kdlite::dom::Value::Bool(value))); } kdl_config_nodes.push(kdl_property); } @@ -239,25 +268,33 @@ pub fn obtain_host_configuration( } "enableRewriteLogging" => { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("rewrite_log"); + let mut kdl_property = kdlite::dom::Node::new("rewrite_log"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } } "wwwroot" => { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("root"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("root"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_config_nodes.push(kdl_property); } } "disableTrailingSlashRedirects" => { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("no_trailing_redirect"); + let mut kdl_property = kdlite::dom::Node::new("no_trailing_redirect"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } @@ -267,9 +304,17 @@ pub fn obtain_host_configuration( for value in value { if let Some(user) = value["name"].as_str() { if let Some(pass) = value["pass"].as_str() { - let mut kdl_property = KdlNode::new("user"); - kdl_property.push(KdlValue::String(user.to_string())); - kdl_property.push(KdlValue::String(pass.to_string())); + let mut kdl_property = kdlite::dom::Node::new("user"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(user.to_string()), + ))); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(pass.to_string()), + ))); kdl_config_nodes.push(kdl_property); } } @@ -280,33 +325,66 @@ pub fn obtain_host_configuration( if let Some(value) = value.as_vec() { for value in value { if let Some(scode) = value["scode"].as_i64() { - let mut kdl_property = KdlNode::new("status"); - kdl_property.push(KdlValue::Integer(scode as i128)); + let mut kdl_property = kdlite::dom::Node::new("status"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + scode as i128, + ))); if let Some(value) = value["url"].as_str() { - kdl_property.push(KdlEntry::new_prop("url", KdlValue::String(value.to_string()))); + kdl_property.entries.push(kdlite::dom::Entry::new_prop( + "url", + kdlite::dom::Value::String(std::borrow::Cow::Owned(value.to_string())), + )); } if let Some(value) = value["regex"].as_str() { - kdl_property.push(KdlEntry::new_prop("regex", KdlValue::String(value.to_string()))); + kdl_property.entries.push(kdlite::dom::Entry::new_prop( + "regex", + kdlite::dom::Value::String(std::borrow::Cow::Owned(value.to_string())), + )); } if let Some(value) = value["location"].as_str() { - kdl_property.push(KdlEntry::new_prop("location", KdlValue::String(value.to_string()))); + kdl_property.entries.push(kdlite::dom::Entry::new_prop( + "location", + kdlite::dom::Value::String(std::borrow::Cow::Owned(value.to_string())), + )); } if let Some(value) = value["realm"].as_str() { - kdl_property.push(KdlEntry::new_prop("realm", KdlValue::String(value.to_string()))); + kdl_property.entries.push(kdlite::dom::Entry::new_prop( + "realm", + kdlite::dom::Value::String(std::borrow::Cow::Owned(value.to_string())), + )); } if let Some(value) = value["disableBruteProtection"].as_bool() { - kdl_property.push(KdlEntry::new_prop("brute_protection", KdlValue::Bool(!value))); + kdl_property.entries.push(kdlite::dom::Entry::new_prop( + "brute_protection", + kdlite::dom::Value::Bool(!value), + )); } if let Some(value) = value["userList"].as_vec() { - kdl_property.push(KdlEntry::new_prop( + kdl_property.entries.push(kdlite::dom::Entry::new_prop( "users", - KdlValue::String(value.iter().filter_map(|v| v.as_str()).collect::>().join(",")), + kdlite::dom::Value::String(std::borrow::Cow::Owned( + value + .iter() + .filter_map(|v| v.as_str()) + .collect::>() + .join(",") + .to_string(), + )), )); } if let Some(value) = value["users"].as_vec() { - kdl_property.push(KdlEntry::new_prop( + kdl_property.entries.push(kdlite::dom::Entry::new_prop( "allowed", - KdlValue::String(value.iter().filter_map(|v| v.as_str()).collect::>().join(",")), + kdlite::dom::Value::String(std::borrow::Cow::Owned( + value + .iter() + .filter_map(|v| v.as_str()) + .collect::>() + .join(",") + .to_string(), + )), )); } kdl_config_nodes.push(kdl_property); @@ -319,9 +397,17 @@ pub fn obtain_host_configuration( for value in value { if let Some(scode) = value["scode"].as_i64() { if let Some(path) = value["path"].as_str() { - let mut kdl_property = KdlNode::new("error_page"); - kdl_property.push(KdlValue::Integer(scode as i128)); - kdl_property.push(KdlValue::String(path.to_string())); + let mut kdl_property = kdlite::dom::Node::new("error_page"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + scode as i128, + ))); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(path.to_string()), + ))); kdl_config_nodes.push(kdl_property); } } @@ -330,27 +416,33 @@ pub fn obtain_host_configuration( } "enableETag" => { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("etag"); + let mut kdl_property = kdlite::dom::Node::new("etag"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } } "enableCompression" => { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("compressed"); + let mut kdl_property = kdlite::dom::Node::new("compressed"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } } "enableDirectoryListing" => { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("directory_listing"); + let mut kdl_property = kdlite::dom::Node::new("directory_listing"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } @@ -358,14 +450,22 @@ pub fn obtain_host_configuration( "proxyTo" => { if loaded_modules.contains(&"rproxy".to_string()) { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("proxy"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("proxy"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_config_nodes.push(kdl_property); } else if let Some(value) = value.as_vec() { for value in value { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("proxy"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("proxy"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_config_nodes.push(kdl_property); } } @@ -375,14 +475,22 @@ pub fn obtain_host_configuration( "secureProxyTo" => { if loaded_modules.contains(&"rproxy".to_string()) { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("proxy"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("proxy"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_secure_config_nodes.push(kdl_property); } else if let Some(value) = value.as_vec() { for value in value { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("proxy"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("proxy"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_secure_config_nodes.push(kdl_property); } } @@ -394,8 +502,12 @@ pub fn obtain_host_configuration( if let Some(value) = value.as_vec() { for value in value { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("cache_vary"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("cache_vary"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_config_nodes.push(kdl_property); } } @@ -407,8 +519,12 @@ pub fn obtain_host_configuration( if let Some(value) = value.as_vec() { for value in value { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("cache_ignore"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("cache_ignore"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_config_nodes.push(kdl_property); } } @@ -418,12 +534,18 @@ pub fn obtain_host_configuration( "maximumCacheResponseSize" => { if loaded_modules.contains(&"cache".to_string()) { if let Some(value) = value.as_i64() { - let mut kdl_property = KdlNode::new("cache_max_response_size"); - kdl_property.push(KdlValue::Integer(value as i128)); + let mut kdl_property = kdlite::dom::Node::new("cache_max_response_size"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + value as i128, + ))); kdl_config_nodes.push(kdl_property); } else if value.is_null() { - let mut kdl_property = KdlNode::new("cache_max_response_size"); - kdl_property.push(KdlValue::Null); + let mut kdl_property = kdlite::dom::Node::new("cache_max_response_size"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Null)); kdl_config_nodes.push(kdl_property); } } @@ -433,8 +555,12 @@ pub fn obtain_host_configuration( if let Some(value) = value.as_vec() { for value in value { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("cgi_extension"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("cgi_extension"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_config_nodes.push(kdl_property); } } @@ -447,18 +573,32 @@ pub fn obtain_host_configuration( for (extension, interpreter) in value { if let Some(extension) = extension.as_str() { if let Some(interpreter) = interpreter.as_vec() { - let mut kdl_property = KdlNode::new("cgi_interpreter"); - kdl_property.push(KdlValue::String(extension.to_string())); + let mut kdl_property = kdlite::dom::Node::new("cgi_interpreter"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(extension.to_string()), + ))); for value in interpreter { if let Some(value) = value.as_str() { - kdl_property.push(KdlValue::String(value.to_string())); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); } } kdl_config_nodes.push(kdl_property); } else if interpreter.is_null() { - let mut kdl_property = KdlNode::new("cgi_interpreter"); - kdl_property.push(KdlValue::String(extension.to_string())); - kdl_property.push(KdlValue::Null); + let mut kdl_property = kdlite::dom::Node::new("cgi_interpreter"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(extension.to_string()), + ))); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Null)); kdl_config_nodes.push(kdl_property); } } @@ -494,8 +634,12 @@ pub fn obtain_host_configuration( "authTo" => { if loaded_modules.contains(&"fauth".to_string()) { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("auth_to"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("auth_to"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_config_nodes.push(kdl_property); } } @@ -505,8 +649,12 @@ pub fn obtain_host_configuration( if let Some(value) = value.as_vec() { for value in value { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("auth_to_copy"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("auth_to_copy"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_config_nodes.push(kdl_property); } } @@ -516,9 +664,11 @@ pub fn obtain_host_configuration( "enableLoadBalancerHealthCheck" => { if loaded_modules.contains(&"rproxy".to_string()) { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("lb_health_check"); + let mut kdl_property = kdlite::dom::Node::new("lb_health_check"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } @@ -527,8 +677,12 @@ pub fn obtain_host_configuration( "loadBalancerHealthCheckMaximumFails" => { if loaded_modules.contains(&"rproxy".to_string()) { if let Some(value) = value.as_i64() { - let mut kdl_property = KdlNode::new("lb_health_check_max_fails"); - kdl_property.push(KdlValue::Integer(value as i128)); + let mut kdl_property = kdlite::dom::Node::new("lb_health_check_max_fails"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + value as i128, + ))); kdl_config_nodes.push(kdl_property); } } @@ -536,9 +690,11 @@ pub fn obtain_host_configuration( "disableProxyCertificateVerification" => { if loaded_modules.contains(&"rproxy".to_string()) { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("proxy_no_verification"); + let mut kdl_property = kdlite::dom::Node::new("proxy_no_verification"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } @@ -577,9 +733,11 @@ pub fn obtain_host_configuration( "proxyInterceptErrors" => { if loaded_modules.contains(&"rproxy".to_string()) { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("proxy_intercept_errors"); + let mut kdl_property = kdlite::dom::Node::new("proxy_intercept_errors"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_config_nodes.push(kdl_property); } @@ -589,14 +747,26 @@ pub fn obtain_host_configuration( if loaded_modules.contains(&"rproxy".to_string()) { if let Some(value) = value.as_bool() { if value { - let mut kdl_property = KdlNode::new("proxy_request_header_remove"); - kdl_property.push(KdlValue::String("X-Forwarded-For".to_string())); + let mut kdl_property = kdlite::dom::Node::new("proxy_request_header_remove"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned("X-Forwarded-For".to_string()), + ))); kdl_config_nodes.push(kdl_property); - let mut kdl_property = KdlNode::new("proxy_request_header_remove"); - kdl_property.push(KdlValue::String("X-Forwarded-Proto".to_string())); + let mut kdl_property = kdlite::dom::Node::new("proxy_request_header_remove"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned("X-Forwarded-Proto".to_string()), + ))); kdl_config_nodes.push(kdl_property); - let mut kdl_property = KdlNode::new("proxy_request_header_remove"); - kdl_property.push(KdlValue::String("X-Forwarded-Host".to_string())); + let mut kdl_property = kdlite::dom::Node::new("proxy_request_header_remove"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned("X-Forwarded-Host".to_string()), + ))); kdl_config_nodes.push(kdl_property); } } @@ -608,17 +778,28 @@ pub fn obtain_host_configuration( } if loaded_modules.contains(&"scgi".to_string()) { - let mut kdl_scgi = KdlNode::new("scgi"); - kdl_scgi.push(KdlValue::String(scgi_to.to_string())); + let mut kdl_scgi = kdlite::dom::Node::new("scgi"); + kdl_scgi + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(scgi_to.to_string()), + ))); if let Some(scgi_path) = scgi_path { - let mut kdl_location = KdlNode::new("location"); - kdl_location.push(KdlValue::String(scgi_path.to_string())); - kdl_location.push(KdlEntry::new_prop("remove_base", KdlValue::Bool(true))); - let mut location_config = KdlDocument::new(); - let location_config_nodes = location_config.nodes_mut(); + let mut kdl_location = kdlite::dom::Node::new("location"); + kdl_location + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(scgi_path.to_string()), + ))); + kdl_location.entries.push(kdlite::dom::Entry::new_prop( + "remove_base", + kdlite::dom::Value::Bool(true), + )); + let mut location_config = kdlite::dom::Document::new(); + let location_config_nodes = &mut location_config.nodes; location_config_nodes.push(kdl_scgi); - kdl_location.set_children(location_config); + kdl_location.children = Some(location_config); kdl_config_nodes.insert(0, kdl_location); } else { kdl_config_nodes.push(kdl_scgi); @@ -626,38 +807,63 @@ pub fn obtain_host_configuration( } for custom_header in custom_headers.iter() { - let mut kdl_property = KdlNode::new("header"); - kdl_property.push(KdlValue::String(custom_header.0.to_string())); - kdl_property.push(KdlValue::String(custom_header.1.to_string())); + let mut kdl_property = kdlite::dom::Node::new("header"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(custom_header.0.to_string()), + ))); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(custom_header.1.to_string()), + ))); kdl_config_nodes.push(kdl_property); } if loaded_modules.contains(&"fcgi".to_string()) { - let mut kdl_fcgi = KdlNode::new("fcgi"); - kdl_fcgi.push(KdlValue::String(fcgi_to.to_string())); + let mut kdl_fcgi = kdlite::dom::Node::new("fcgi"); + kdl_fcgi + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(fcgi_to.to_string()), + ))); let mut kdl_fcgi_extensions = Vec::new(); for value in fcgi_script_extensions { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("fcgi_extension"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("fcgi_extension"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_fcgi_extensions.push(kdl_property); } } if let Some(fcgi_path) = fcgi_path { - let mut kdl_location = KdlNode::new("location"); - kdl_location.push(KdlValue::String(fcgi_path.to_string())); - kdl_location.push(KdlEntry::new_prop("remove_base", KdlValue::Bool(true))); - let mut location_config = KdlDocument::new(); - let location_config_nodes = location_config.nodes_mut(); + let mut kdl_location = kdlite::dom::Node::new("location"); + kdl_location + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(fcgi_path.to_string()), + ))); + kdl_location.entries.push(kdlite::dom::Entry::new_prop( + "remove_base", + kdlite::dom::Value::Bool(true), + )); + let mut location_config = kdlite::dom::Document::new(); + let location_config_nodes = &mut location_config.nodes; location_config_nodes.push(kdl_fcgi); for kdl_fcgi_extension in kdl_fcgi_extensions { kdl_config_nodes.push(kdl_fcgi_extension); } - kdl_location.set_children(location_config); + kdl_location.children = Some(location_config); kdl_config_nodes.insert(0, kdl_location); } else { - kdl_fcgi.push(KdlEntry::new_prop("pass", KdlValue::Bool(false))); + kdl_fcgi + .entries + .push(kdlite::dom::Entry::new_prop("pass", kdlite::dom::Value::Bool(false))); kdl_config_nodes.push(kdl_fcgi); for kdl_fcgi_extension in kdl_fcgi_extensions { kdl_config_nodes.push(kdl_fcgi_extension); @@ -667,17 +873,28 @@ pub fn obtain_host_configuration( if loaded_modules.contains(&"wsgi".to_string()) { if let Some(wsgi_application_path) = wsgi_application_path { - let mut kdl_wsgi = KdlNode::new("wsgi"); - kdl_wsgi.push(KdlValue::String(wsgi_application_path.to_string())); + let mut kdl_wsgi = kdlite::dom::Node::new("wsgi"); + kdl_wsgi + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(wsgi_application_path.to_string()), + ))); if let Some(wsgi_path) = wsgi_path { - let mut kdl_location = KdlNode::new("location"); - kdl_location.push(KdlValue::String(wsgi_path.to_string())); - kdl_location.push(KdlEntry::new_prop("remove_base", KdlValue::Bool(true))); - let mut location_config = KdlDocument::new(); - let location_config_nodes = location_config.nodes_mut(); + let mut kdl_location = kdlite::dom::Node::new("location"); + kdl_location + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(wsgi_path.to_string()), + ))); + kdl_location.entries.push(kdlite::dom::Entry::new_prop( + "remove_base", + kdlite::dom::Value::Bool(true), + )); + let mut location_config = kdlite::dom::Document::new(); + let location_config_nodes = &mut location_config.nodes; location_config_nodes.push(kdl_wsgi); - kdl_location.set_children(location_config); + kdl_location.children = Some(location_config); kdl_config_nodes.insert(0, kdl_location); } else { kdl_config_nodes.push(kdl_wsgi); @@ -687,17 +904,28 @@ pub fn obtain_host_configuration( if loaded_modules.contains(&"wsgid".to_string()) { if let Some(wsgid_application_path) = wsgid_application_path { - let mut kdl_wsgid = KdlNode::new("wsgid"); - kdl_wsgid.push(KdlValue::String(wsgid_application_path.to_string())); + let mut kdl_wsgid = kdlite::dom::Node::new("wsgid"); + kdl_wsgid + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(wsgid_application_path.to_string()), + ))); if let Some(wsgid_path) = wsgid_path { - let mut kdl_location = KdlNode::new("location"); - kdl_location.push(KdlValue::String(wsgid_path.to_string())); - kdl_location.push(KdlEntry::new_prop("remove_base", KdlValue::Bool(true))); - let mut location_config = KdlDocument::new(); - let location_config_nodes = location_config.nodes_mut(); + let mut kdl_location = kdlite::dom::Node::new("location"); + kdl_location + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(wsgid_path.to_string()), + ))); + kdl_location.entries.push(kdlite::dom::Entry::new_prop( + "remove_base", + kdlite::dom::Value::Bool(true), + )); + let mut location_config = kdlite::dom::Document::new(); + let location_config_nodes = &mut location_config.nodes; location_config_nodes.push(kdl_wsgid); - kdl_location.set_children(location_config); + kdl_location.children = Some(location_config); kdl_config_nodes.insert(0, kdl_location); } else { kdl_config_nodes.push(kdl_wsgid); @@ -707,17 +935,28 @@ pub fn obtain_host_configuration( if loaded_modules.contains(&"asgi".to_string()) { if let Some(asgi_application_path) = asgi_application_path { - let mut kdl_asgi = KdlNode::new("asgi"); - kdl_asgi.push(KdlValue::String(asgi_application_path.to_string())); + let mut kdl_asgi = kdlite::dom::Node::new("asgi"); + kdl_asgi + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(asgi_application_path.to_string()), + ))); if let Some(asgi_path) = asgi_path { - let mut kdl_location = KdlNode::new("location"); - kdl_location.push(KdlValue::String(asgi_path.to_string())); - kdl_location.push(KdlEntry::new_prop("remove_base", KdlValue::Bool(true))); - let mut location_config = KdlDocument::new(); - let location_config_nodes = location_config.nodes_mut(); + let mut kdl_location = kdlite::dom::Node::new("location"); + kdl_location + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(asgi_path.to_string()), + ))); + kdl_location.entries.push(kdlite::dom::Entry::new_prop( + "remove_base", + kdlite::dom::Value::Bool(true), + )); + let mut location_config = kdlite::dom::Document::new(); + let location_config_nodes = &mut location_config.nodes; location_config_nodes.push(kdl_asgi); - kdl_location.set_children(location_config); + kdl_location.children = Some(location_config); kdl_config_nodes.insert(0, kdl_location); } else { kdl_config_nodes.push(kdl_asgi); @@ -727,7 +966,7 @@ pub fn obtain_host_configuration( ( kdl_config, - if kdl_secure_config.is_empty() { + if kdl_secure_config.nodes.is_empty() { None } else { Some(kdl_secure_config) @@ -735,12 +974,19 @@ pub fn obtain_host_configuration( ) } -pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec, Vec, u16) { +pub fn obtain_global_configuration( + yaml_configuration: &Yaml, +) -> ( + kdlite::dom::Node<'static>, + Vec>, + Vec, + u16, +) { let empty_hashmap = yaml_rust2::yaml::Hash::new(); let yaml_global_properties = yaml_configuration["global"].as_hash().unwrap_or(&empty_hashmap); - let mut kdl_global_properties = KdlNode::new("*"); - let mut kdl_global_children_to_insert = KdlDocument::new(); - let kdl_global_children_nodes = kdl_global_children_to_insert.nodes_mut(); + let mut kdl_global_properties = kdlite::dom::Node::new("*"); + let mut kdl_global_children_to_insert = kdlite::dom::Document::new(); + let kdl_global_children_nodes = &mut kdl_global_children_to_insert.nodes; let mut sni_configuration = Vec::new(); let mut load_server_modules = Vec::new(); @@ -763,19 +1009,19 @@ pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec { - let kdl_property = KdlNode::new("cgi"); + let kdl_property = kdlite::dom::Node::new("cgi"); kdl_global_children_nodes.push(kdl_property); } "cache" => { - let kdl_property = KdlNode::new("cache"); + let kdl_property = kdlite::dom::Node::new("cache"); kdl_global_children_nodes.push(kdl_property); } "example" => { - let kdl_property = KdlNode::new("example_handler"); + let kdl_property = kdlite::dom::Node::new("example_handler"); kdl_global_children_nodes.push(kdl_property); } "fproxy" => { - let kdl_property = KdlNode::new("forward_proxy"); + let kdl_property = kdlite::dom::Node::new("forward_proxy"); kdl_global_children_nodes.push(kdl_property); } _ => (), @@ -810,36 +1056,56 @@ pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec { if let Some(http2_setting_value) = http2_setting_value.as_i64() { - let mut kdl_property = KdlNode::new("h2_initial_window_size"); - kdl_property.push(KdlValue::Integer(http2_setting_value as i128)); + let mut kdl_property = kdlite::dom::Node::new("h2_initial_window_size"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + http2_setting_value as i128, + ))); kdl_global_children_nodes.push(kdl_property); } } "maxFrameSize" => { if let Some(http2_setting_value) = http2_setting_value.as_i64() { - let mut kdl_property = KdlNode::new("h2_max_frame_size"); - kdl_property.push(KdlValue::Integer(http2_setting_value as i128)); + let mut kdl_property = kdlite::dom::Node::new("h2_max_frame_size"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + http2_setting_value as i128, + ))); kdl_global_children_nodes.push(kdl_property); } } "maxConcurrentStreams" => { if let Some(http2_setting_value) = http2_setting_value.as_i64() { - let mut kdl_property = KdlNode::new("h2_max_concurrent_streams"); - kdl_property.push(KdlValue::Integer(http2_setting_value as i128)); + let mut kdl_property = kdlite::dom::Node::new("h2_max_concurrent_streams"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + http2_setting_value as i128, + ))); kdl_global_children_nodes.push(kdl_property); } } "maxHeaderListSize" => { if let Some(http2_setting_value) = http2_setting_value.as_i64() { - let mut kdl_property = KdlNode::new("h2_max_header_list_size"); - kdl_property.push(KdlValue::Integer(http2_setting_value as i128)); + let mut kdl_property = kdlite::dom::Node::new("h2_max_header_list_size"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + http2_setting_value as i128, + ))); kdl_global_children_nodes.push(kdl_property); } } "enableConnectProtocol" => { if let Some(http2_setting_value) = http2_setting_value.as_bool() { - let mut kdl_property = KdlNode::new("h2_enable_connect_protocol"); - kdl_property.push(KdlValue::Bool(http2_setting_value)); + let mut kdl_property = kdlite::dom::Node::new("h2_enable_connect_protocol"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool( + http2_setting_value, + ))); kdl_global_children_nodes.push(kdl_property); } } @@ -851,15 +1117,23 @@ pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("log"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("log"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_global_children_nodes.push(kdl_property); } } "errorLogFilePath" => { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("error_log"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("error_log"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_global_children_nodes.push(kdl_property); } } @@ -889,23 +1163,30 @@ pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec (KdlNode, Vec { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("tls_client_certificate"); - kdl_property.push(KdlValue::Bool(value)); + let mut kdl_property = kdlite::dom::Node::new("tls_client_certificate"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(value))); kdl_global_children_nodes.push(kdl_property); } } @@ -924,8 +1207,12 @@ pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec (KdlNode, Vec (KdlNode, Vec { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("tls_min_version"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("tls_min_version"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_global_children_nodes.push(kdl_property); } } "tlsMaxVersion" => { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("tls_max_version"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("tls_max_version"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_global_children_nodes.push(kdl_property); } } @@ -965,8 +1264,12 @@ pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec (KdlNode, Vec { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("ocsp_stapling"); - kdl_property.push(KdlValue::Bool(value)); + let mut kdl_property = kdlite::dom::Node::new("ocsp_stapling"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(value))); kdl_global_children_nodes.push(kdl_property); } } @@ -997,54 +1302,74 @@ pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("auto_tls_contact"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("auto_tls_contact"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_global_children_nodes.push(kdl_property); } } "automaticTLSContactCacheDirectory" => { if let Some(value) = value.as_str() { - let mut kdl_property = KdlNode::new("auto_tls_cache"); - kdl_property.push(KdlValue::String(value.to_string())); + let mut kdl_property = kdlite::dom::Node::new("auto_tls_cache"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(value.to_string()), + ))); kdl_global_children_nodes.push(kdl_property); } } "automaticTLSLetsEncryptProduction" => { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("auto_tls_letsencrypt_production"); + let mut kdl_property = kdlite::dom::Node::new("auto_tls_letsencrypt_production"); if !value { - kdl_property.push(KdlValue::Bool(false)); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(false))); } kdl_global_children_nodes.push(kdl_property); } } "useAutomaticTLSHTTPChallenge" => { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("auto_tls_challenge"); - kdl_property.push(KdlValue::String(if value { - "http-01".to_string() - } else { - "tls-alpn-01".to_string() - })); + let mut kdl_property = kdlite::dom::Node::new("auto_tls_challenge"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::String( + std::borrow::Cow::Owned(if value { "http-01" } else { "tls-alpn-01" }.to_string()), + ))); kdl_global_children_nodes.push(kdl_property); } } "timeout" => { if let Some(value) = value.as_i64() { - let mut kdl_property = KdlNode::new("timeout"); - kdl_property.push(KdlValue::Integer(value as i128)); + let mut kdl_property = kdlite::dom::Node::new("timeout"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + value as i128, + ))); kdl_global_children_nodes.push(kdl_property); } else if value.is_null() { - let mut kdl_property = KdlNode::new("timeout"); - kdl_property.push(KdlValue::Null); + let mut kdl_property = kdlite::dom::Node::new("timeout"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Null)); kdl_global_children_nodes.push(kdl_property); } } "loadBalancerHealthCheckWindow" => { if load_server_modules.contains(&"rproxy".to_string()) { if let Some(value) = value.as_i64() { - let mut kdl_property = KdlNode::new("lb_health_check_window"); - kdl_property.push(KdlValue::Integer(value as i128)); + let mut kdl_property = kdlite::dom::Node::new("lb_health_check_window"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + value as i128, + ))); kdl_global_children_nodes.push(kdl_property); } } @@ -1052,12 +1377,18 @@ pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec { if load_server_modules.contains(&"cache".to_string()) { if let Some(value) = value.as_i64() { - let mut kdl_property = KdlNode::new("cache_max_entries"); - kdl_property.push(KdlValue::Integer(value as i128)); + let mut kdl_property = kdlite::dom::Node::new("cache_max_entries"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Integer( + value as i128, + ))); kdl_global_children_nodes.push(kdl_property); } else if value.is_null() { - let mut kdl_property = KdlNode::new("cache_max_entries"); - kdl_property.push(KdlValue::Null); + let mut kdl_property = kdlite::dom::Node::new("cache_max_entries"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Null)); kdl_global_children_nodes.push(kdl_property); } } @@ -1065,8 +1396,10 @@ pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec { if load_server_modules.contains(&"wsgi".to_string()) { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("wsgi_clear_imports"); - kdl_property.push(KdlValue::Bool(value)); + let mut kdl_property = kdlite::dom::Node::new("wsgi_clear_imports"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(value))); kdl_global_children_nodes.push(kdl_property); } } @@ -1074,8 +1407,10 @@ pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec { if load_server_modules.contains(&"asgi".to_string()) { if let Some(value) = value.as_bool() { - let mut kdl_property = KdlNode::new("asgi_clear_imports"); - kdl_property.push(KdlValue::Bool(value)); + let mut kdl_property = kdlite::dom::Node::new("asgi_clear_imports"); + kdl_property + .entries + .push(kdlite::dom::Entry::new_value(kdlite::dom::Value::Bool(value))); kdl_global_children_nodes.push(kdl_property); } } @@ -1085,84 +1420,146 @@ pub fn obtain_global_configuration(yaml_configuration: &Yaml) -> (KdlNode, Vec ServerConfigurationEntry { +fn kdlite_error_near(pos: usize, file_contents: &str) -> String { + let part = file_contents + .split_at_checked(pos) + .map(|split| split.1.split_at_checked(50).map_or(split.1, |split2| split2.0)) + .and_then(|part| if part.is_empty() { None } else { Some(part) }); + part.map_or("".to_string(), |p| { + snailquote::escape(p).to_string() + }) +} + +fn display_kdlite_error(err: &kdlite::stream::Error, file_contents: &str) -> String { + match err { + kdlite::stream::Error::ExpectedSpace(index) => { + format!("Expected space near {}", kdlite_error_near(*index, file_contents)) + } + kdlite::stream::Error::ExpectedCloseParen(index) => { + format!("Expected `)` near {}", kdlite_error_near(*index, file_contents)) + } + kdlite::stream::Error::ExpectedComment(index) => format!( + "Expected single-line comment near {}", + kdlite_error_near(*index, file_contents) + ), + kdlite::stream::Error::ExpectedNewline(index) => { + format!("Expected newline near {}", kdlite_error_near(*index, file_contents)) + } + kdlite::stream::Error::ExpectedString(index) => { + format!("Expected string near {}", kdlite_error_near(*index, file_contents)) + } + kdlite::stream::Error::ExpectedValue(index) => { + format!("Expected value near {}", kdlite_error_near(*index, file_contents)) + } + kdlite::stream::Error::UnexpectedCloseBracket(index) => { + format!("Unexpected `}}` near {}", kdlite_error_near(*index, file_contents)) + } + kdlite::stream::Error::UnexpectedNewline(index) => { + format!("Unexpected newline near {}", kdlite_error_near(*index, file_contents)) + } + kdlite::stream::Error::InvalidNumber(index) => { + format!("Invalid number near {}", kdlite_error_near(*index, file_contents)) + } + kdlite::stream::Error::BadKeyword(index) => { + format!("Invalid keyword name near {}", kdlite_error_near(*index, file_contents)) + } + kdlite::stream::Error::BadIdentifier(index) => format!( + "Invalid identifier name near {}", + kdlite_error_near(*index, file_contents) + ), + kdlite::stream::Error::BadEscape(index) => format!( + "Invalid escape sequence near {}", + kdlite_error_near(*index, file_contents) + ), + kdlite::stream::Error::BadIndent(index) => { + format!("Invalid indentation near {}", kdlite_error_near(*index, file_contents)) + } + kdlite::stream::Error::MultipleChildren(index) => format!( + "Multiple children for one KDL node near {}", + kdlite_error_near(*index, file_contents) + ), + kdlite::stream::Error::UnexpectedEof => "Unexpected end of file".to_string(), + kdlite::stream::Error::BannedChar(ch, index) => format!( + "Invalid character `{}` near {}", + ch.escape_default(), + kdlite_error_near(*index, file_contents) + ), + _ => "Unknown error".to_string(), + } +} + +fn kdl_node_to_configuration_entry(kdl_node: &kdlite::dom::Node) -> ServerConfigurationEntry { let mut values = Vec::new(); let mut props = HashMap::new(); - for kdl_entry in kdl_node.iter() { - let value = match kdl_entry.value().to_owned() { - KdlValue::String(value) => ServerConfigurationValue::String(value), - KdlValue::Integer(value) => ServerConfigurationValue::Integer(value), - KdlValue::Float(value) => ServerConfigurationValue::Float(value), - KdlValue::Bool(value) => ServerConfigurationValue::Bool(value), - KdlValue::Null => ServerConfigurationValue::Null, + for kdl_entry in &kdl_node.entries { + let value = match &kdl_entry.value { + kdlite::dom::Value::String(value) => ServerConfigurationValue::String(value.to_string()), + kdlite::dom::Value::Integer(value) => ServerConfigurationValue::Integer(*value), + kdlite::dom::Value::Float(value) => ServerConfigurationValue::Float(*value), + kdlite::dom::Value::Bool(value) => ServerConfigurationValue::Bool(*value), + kdlite::dom::Value::Null => ServerConfigurationValue::Null, }; - if let Some(prop_name) = kdl_entry.name() { - props.insert(prop_name.value().to_string(), value); + if let Some(prop_name) = kdl_entry.key() { + props.insert(prop_name.to_string(), value); } else { values.push(value); } @@ -76,15 +143,12 @@ fn load_configuration_inner( }; // Parse the configuration file contents - let kdl_document: KdlDocument = match file_contents.parse() { + let kdl_document = match kdlite::dom::Document::parse(&file_contents) { Ok(document) => document, - Err(err) => { - let err: miette::Error = err.into(); - Err(anyhow::anyhow!( - "Failed to parse the server configuration file: {:?}", - err - ))? - } + Err(err) => Err(anyhow::anyhow!( + "Failed to parse the server configuration file: {}", + display_kdlite_error(&err, &file_contents) + ))?, }; // Loaded configuration vector @@ -94,14 +158,17 @@ fn load_configuration_inner( let mut loaded_conditions: HashMap> = HashMap::new(); // KDL configuration snippets - let mut snippets: HashMap = HashMap::new(); + let mut snippets: HashMap = HashMap::new(); // Iterate over KDL nodes - for kdl_node in kdl_document { - let global_name = kdl_node.name().value(); - let children = kdl_node.children(); + for kdl_node in &kdl_document.nodes { + let global_name = kdl_node.name(); + let children = &kdl_node.children; if global_name == "snippet" { - if let Some(snippet_name) = kdl_node.get(0).and_then(|v| v.as_string()) { + if let Some(snippet_name) = kdl_node.entry(0).and_then(|v| match &v.value { + kdlite::dom::Value::String(v) => Some(&**v), + _ => None, + }) { if let Some(children) = children { snippets.insert(snippet_name.to_string(), children.to_owned()); } else { @@ -162,26 +229,29 @@ fn load_configuration_inner( }; let mut configuration_entries: HashMap = HashMap::new(); - for kdl_node in children.nodes() { + for kdl_node in &children.nodes { #[allow(clippy::too_many_arguments)] fn kdl_iterate_fn( canonical_pathbuf: &PathBuf, host_filter: &(Option, Option, Option, bool), configurations: &mut Vec, configuration_entries: &mut HashMap, - kdl_node: &KdlNode, + kdl_node: &kdlite::dom::Node, conditions: &mut Option<&mut Conditions>, is_error_config: bool, loaded_conditions: &mut HashMap>, - snippets: &HashMap, + snippets: &HashMap, ) -> Result<(), Box> { let (hostname, ip, port, is_host) = host_filter; - let kdl_node_name = kdl_node.name().value(); - let children = kdl_node.children(); + let kdl_node_name = kdl_node.name(); + let children = &kdl_node.children; if kdl_node_name == "use" { - if let Some(snippet_name) = kdl_node.entry(0).and_then(|e| e.value().as_string()) { + if let Some(snippet_name) = kdl_node.entry(0).and_then(|e| match &e.value { + kdlite::dom::Value::String(s) => Some(&**s), + _ => None, + }) { if let Some(snippet) = snippets.get(snippet_name) { - for kdl_node in snippet.nodes() { + for kdl_node in &snippet.nodes { kdl_iterate_fn( canonical_pathbuf, host_filter, @@ -213,13 +283,16 @@ fn load_configuration_inner( let mut configuration_entries: HashMap = HashMap::new(); if let Some(children) = children { if let Some(location) = kdl_node.entry(0) { - if let Some(location_str) = location.value().as_string() { + if let Some(location_str) = match &location.value { + kdlite::dom::Value::String(s) => Some(&**s), + _ => None, + } { let mut conditions = Conditions { location_prefix: location_str.to_string(), conditionals: vec![], }; let mut loaded_conditions = loaded_conditions.clone(); - for kdl_node in children.nodes() { + for kdl_node in &children.nodes { kdl_iterate_fn( canonical_pathbuf, host_filter, @@ -234,7 +307,10 @@ fn load_configuration_inner( } if kdl_node .entry("remove_base") - .and_then(|e| e.value().as_bool()) + .and_then(|e| match &e.value { + kdlite::dom::Value::Bool(b) => Some(*b), + _ => None, + }) .unwrap_or(false) { configuration_entries.insert( @@ -284,11 +360,14 @@ fn load_configuration_inner( } if let Some(children) = children { if let Some(condition_name) = kdl_node.entry(0) { - if let Some(condition_name_str) = condition_name.value().as_string() { + if let Some(condition_name_str) = match &condition_name.value { + kdlite::dom::Value::String(s) => Some(&**s), + _ => None, + } { let mut conditions_data = Vec::new(); let mut nodes_stack = Vec::new(); - nodes_stack.push(children.nodes().iter()); + nodes_stack.push(children.nodes.iter()); while let Some(kdl_node) = { let mut last_iterator_item = None; @@ -300,11 +379,14 @@ fn load_configuration_inner( } last_iterator_item } { - let name = kdl_node.name().value(); + let name = kdl_node.name(); if name == "use" { - if let Some(snippet_name) = kdl_node.get(0).and_then(|v| v.as_string()) { + if let Some(snippet_name) = kdl_node.entry(0).and_then(|v| match &v.value { + kdlite::dom::Value::String(s) => Some(&**s), + _ => None, + }) { if let Some(snippet) = snippets.get(snippet_name) { - nodes_stack.push(snippet.nodes().iter()); + nodes_stack.push(snippet.nodes.iter()); continue; } else { Err(anyhow::anyhow!( @@ -350,7 +432,10 @@ fn load_configuration_inner( let mut configuration_entries: HashMap = HashMap::new(); if let Some(children) = children { if let Some(condition_name) = kdl_node.entry(0) { - if let Some(condition_name_str) = condition_name.value().as_string() { + if let Some(condition_name_str) = match &condition_name.value { + kdlite::dom::Value::String(s) => Some(&**s), + _ => None, + } { let mut new_conditions = if let Some(conditions) = conditions { conditions.clone() } else { @@ -369,7 +454,7 @@ fn load_configuration_inner( } let mut loaded_conditions = loaded_conditions.clone(); - for kdl_node in children.nodes() { + for kdl_node in &children.nodes { kdl_iterate_fn( canonical_pathbuf, host_filter, @@ -421,7 +506,10 @@ fn load_configuration_inner( let mut configuration_entries: HashMap = HashMap::new(); if let Some(children) = children { if let Some(condition_name) = kdl_node.entry(0) { - if let Some(condition_name_str) = condition_name.value().as_string() { + if let Some(condition_name_str) = match &condition_name.value { + kdlite::dom::Value::String(s) => Some(&**s), + _ => None, + } { let mut new_conditions = if let Some(conditions) = conditions { conditions.clone() } else { @@ -442,7 +530,7 @@ fn load_configuration_inner( } let mut loaded_conditions = loaded_conditions.clone(); - for kdl_node in children.nodes() { + for kdl_node in &children.nodes { kdl_iterate_fn( canonical_pathbuf, host_filter, @@ -494,9 +582,12 @@ fn load_configuration_inner( let mut configuration_entries: HashMap = HashMap::new(); if let Some(children) = children { if let Some(error_status_code) = kdl_node.entry(0) { - if let Some(error_status_code) = error_status_code.value().as_integer() { + if let Some(error_status_code) = match &error_status_code.value { + kdlite::dom::Value::Integer(i) => Some(*i), + _ => None, + } { let mut loaded_conditions = loaded_conditions.clone(); - for kdl_node in children.nodes() { + for kdl_node in &children.nodes { kdl_iterate_fn( canonical_pathbuf, host_filter, @@ -531,8 +622,8 @@ fn load_configuration_inner( ))? } } else { - for kdl_node in children.nodes() { - let kdl_node_name = kdl_node.name().value(); + for kdl_node in &children.nodes { + let kdl_node_name = kdl_node.name(); let value = kdl_node_to_configuration_entry(kdl_node); if let Some(entries) = configuration_entries.get_mut(kdl_node_name) { entries.inner.push(value); @@ -608,11 +699,14 @@ fn load_configuration_inner( } else if global_name == "include" { // Get the list of included files and include the configurations let mut include_files = Vec::new(); - for include_one in kdl_node.entries() { - if include_one.name().is_some() { + for include_one in &kdl_node.entries { + if include_one.key().is_some() { continue; } - if let Some(include_glob) = include_one.value().as_string() { + if let Some(include_glob) = match &include_one.value { + kdlite::dom::Value::String(s) => Some(&**s), + _ => None, + } { let include_glob_pathbuf = match PathBuf::from_str(include_glob) { Ok(pathbuf) => pathbuf, Err(err) => { diff --git a/ferron/src/config/adapters/yaml_legacy.rs b/ferron/src/config/adapters/yaml_legacy.rs index 4f21488d..fbc787f1 100644 --- a/ferron/src/config/adapters/yaml_legacy.rs +++ b/ferron/src/config/adapters/yaml_legacy.rs @@ -7,7 +7,6 @@ use std::{ use ferron_common::observability::ObservabilityBackendChannels; use ferron_yaml2kdl_core::convert_yaml_to_kdl; -use kdl::{KdlDocument, KdlNode, KdlValue}; use crate::config::{ Conditions, ErrorHandlerStatus, ServerConfiguration, ServerConfigurationEntries, ServerConfigurationEntry, @@ -16,19 +15,19 @@ use crate::config::{ use super::ConfigurationAdapter; -fn kdl_node_to_configuration_entry(kdl_node: &KdlNode) -> ServerConfigurationEntry { +fn kdl_node_to_configuration_entry(kdl_node: &kdlite::dom::Node) -> ServerConfigurationEntry { let mut values = Vec::new(); let mut props = HashMap::new(); - for kdl_entry in kdl_node.iter() { - let value = match kdl_entry.value().to_owned() { - KdlValue::String(value) => ServerConfigurationValue::String(value), - KdlValue::Integer(value) => ServerConfigurationValue::Integer(value), - KdlValue::Float(value) => ServerConfigurationValue::Float(value), - KdlValue::Bool(value) => ServerConfigurationValue::Bool(value), - KdlValue::Null => ServerConfigurationValue::Null, + for kdl_entry in &kdl_node.entries { + let value = match &kdl_entry.value { + kdlite::dom::Value::String(value) => ServerConfigurationValue::String(value.to_string()), + kdlite::dom::Value::Integer(value) => ServerConfigurationValue::Integer(*value), + kdlite::dom::Value::Float(value) => ServerConfigurationValue::Float(*value), + kdlite::dom::Value::Bool(value) => ServerConfigurationValue::Bool(*value), + kdlite::dom::Value::Null => ServerConfigurationValue::Null, }; - if let Some(prop_name) = kdl_entry.name() { - props.insert(prop_name.value().to_string(), value); + if let Some(prop_name) = kdl_entry.key() { + props.insert(prop_name.to_string(), value); } else { values.push(value); } @@ -53,7 +52,7 @@ impl YamlLegacyConfigurationAdapter { impl ConfigurationAdapter for YamlLegacyConfigurationAdapter { fn load_configuration(&self, path: &Path) -> Result, Box> { // Read and parse the configuration file contents - let kdl_document: KdlDocument = match convert_yaml_to_kdl(path.to_path_buf()) { + let kdl_document: kdlite::dom::Document = match convert_yaml_to_kdl(path.to_path_buf()) { Ok(document) => document, Err(err) => Err(anyhow::anyhow!( "Failed to read and parse the server configuration file: {}", @@ -65,12 +64,12 @@ impl ConfigurationAdapter for YamlLegacyConfigurationAdapter { let mut configurations = Vec::new(); // Iterate over KDL nodes - for kdl_node in kdl_document { - let global_name = kdl_node.name().value(); - let children = kdl_node.children(); + for kdl_node in &kdl_document.nodes { + let global_name = kdl_node.name(); + let children = &kdl_node.children; if let Some(children) = children { for global_name in global_name.split(",") { - let (hostname, ip, port, is_host) = if global_name == "globals" { + let host_filter = if global_name == "globals" { (None, None, None, false) } else if let Ok(socket_addr) = global_name.parse::() { (None, Some(socket_addr.ip()), Some(socket_addr.port()), true) @@ -118,147 +117,128 @@ impl ConfigurationAdapter for YamlLegacyConfigurationAdapter { }; let mut configuration_entries: HashMap = HashMap::new(); - for kdl_node in children.nodes() { - let kdl_node_name = kdl_node.name().value(); - let children = kdl_node.children(); - if kdl_node_name == "location" { - let mut configuration_entries: HashMap = HashMap::new(); - if let Some(children) = children { - if let Some(location) = kdl_node.entry(0) { - if let Some(location_str) = location.value().as_string() { - for kdl_node in children.nodes() { - let kdl_node_name = kdl_node.name().value(); - let children = kdl_node.children(); - if kdl_node_name == "error_config" { - let mut configuration_entries: HashMap = HashMap::new(); - if let Some(children) = children { - if let Some(error_status_code) = kdl_node.entry(0) { - if let Some(error_status_code) = error_status_code.value().as_integer() { - for kdl_node in children.nodes() { - let kdl_node_name = kdl_node.name().value(); - let value = kdl_node_to_configuration_entry(kdl_node); - if let Some(entries) = configuration_entries.get_mut(kdl_node_name) { - entries.inner.push(value); - } else { - configuration_entries.insert( - kdl_node_name.to_string(), - ServerConfigurationEntries { inner: vec![value] }, - ); - } - } - configurations.push(ServerConfiguration { - entries: configuration_entries, - filters: ServerConfigurationFilters { - is_host, - hostname: hostname.clone(), - ip, - port, - condition: Some(Conditions { - location_prefix: location_str.to_string(), - conditionals: vec![], - }), - error_handler_status: Some(ErrorHandlerStatus::Status(error_status_code as u16)), - }, - modules: vec![], - observability: ObservabilityBackendChannels::new(), - }); - } else { - Err(anyhow::anyhow!("Invalid error handler status code"))? - } - } else { - for kdl_node in children.nodes() { - let kdl_node_name = kdl_node.name().value(); - let value = kdl_node_to_configuration_entry(kdl_node); - if let Some(entries) = configuration_entries.get_mut(kdl_node_name) { - entries.inner.push(value); - } else { - configuration_entries.insert( - kdl_node_name.to_string(), - ServerConfigurationEntries { inner: vec![value] }, - ); - } - } - configurations.push(ServerConfiguration { - entries: configuration_entries, - filters: ServerConfigurationFilters { - is_host, - hostname: hostname.clone(), - ip, - port, - condition: Some(Conditions { - location_prefix: location_str.to_string(), - conditionals: vec![], - }), - error_handler_status: Some(ErrorHandlerStatus::Any), - }, - modules: vec![], - observability: ObservabilityBackendChannels::new(), - }); - } - } else { - Err(anyhow::anyhow!( - "Error handler blocks should have children, but they don't" - ))? - } - } else { - let value = kdl_node_to_configuration_entry(kdl_node); - if let Some(entries) = configuration_entries.get_mut(kdl_node_name) { - entries.inner.push(value); - } else { - configuration_entries.insert( - kdl_node_name.to_string(), - ServerConfigurationEntries { inner: vec![value] }, - ); - } + for kdl_node in &children.nodes { + #[allow(clippy::too_many_arguments)] + fn kdl_iterate_fn( + host_filter: &(Option, Option, Option, bool), + configurations: &mut Vec, + configuration_entries: &mut HashMap, + kdl_node: &kdlite::dom::Node, + conditions: &mut Option<&mut Conditions>, + is_error_config: bool, + ) -> Result<(), Box> { + let (hostname, ip, port, is_host) = host_filter; + let kdl_node_name = kdl_node.name(); + let children = &kdl_node.children; + if kdl_node_name == "location" { + if is_error_config { + Err(anyhow::anyhow!("Locations in error configurations aren't allowed"))?; + } else if conditions.is_some() { + Err(anyhow::anyhow!( + "Nested locations and locations in conditions aren't allowed" + ))?; + } + let mut configuration_entries: HashMap = HashMap::new(); + if let Some(children) = children { + if let Some(location) = kdl_node.entry(0) { + if let Some(location_str) = match &location.value { + kdlite::dom::Value::String(s) => Some(&**s), + _ => None, + } { + let mut conditions = Conditions { + location_prefix: location_str.to_string(), + conditionals: vec![], + }; + for kdl_node in &children.nodes { + kdl_iterate_fn( + host_filter, + configurations, + &mut configuration_entries, + kdl_node, + &mut Some(&mut conditions), + is_error_config, + )?; } - } - if kdl_node - .entry("remove_base") - .and_then(|e| e.value().as_bool()) - .unwrap_or(false) - { - configuration_entries.insert( - "UNDOCUMENTED_REMOVE_PATH_PREFIX".to_string(), - ServerConfigurationEntries { - inner: vec![ServerConfigurationEntry { - values: vec![ServerConfigurationValue::String(location_str.to_string())], - props: HashMap::new(), - }], + if kdl_node + .entry("remove_base") + .and_then(|e| match &e.value { + kdlite::dom::Value::Bool(b) => Some(*b), + _ => None, + }) + .unwrap_or(false) + { + configuration_entries.insert( + "UNDOCUMENTED_REMOVE_PATH_PREFIX".to_string(), + ServerConfigurationEntries { + inner: vec![ServerConfigurationEntry { + values: vec![ServerConfigurationValue::String(location_str.to_string())], + props: HashMap::new(), + }], + }, + ); + } + configurations.push(ServerConfiguration { + entries: configuration_entries, + filters: ServerConfigurationFilters { + is_host: *is_host, + hostname: hostname.clone(), + ip: *ip, + port: *port, + condition: Some(conditions), + error_handler_status: None, }, - ); + modules: vec![], + observability: ObservabilityBackendChannels::new(), + }); + } else { + Err(anyhow::anyhow!("Invalid location path"))? } - configurations.push(ServerConfiguration { - entries: configuration_entries, - filters: ServerConfigurationFilters { - is_host, - hostname: hostname.clone(), - ip, - port, - condition: Some(Conditions { - location_prefix: location_str.to_string(), - conditionals: vec![], - }), - error_handler_status: None, - }, - modules: vec![], - observability: ObservabilityBackendChannels::new(), - }); } else { - Err(anyhow::anyhow!("Invalid location path"))? + Err(anyhow::anyhow!("Invalid location"))? } } else { - Err(anyhow::anyhow!("Invalid location"))? + Err(anyhow::anyhow!("Locations should have children, but they don't"))? } - } else { - Err(anyhow::anyhow!("Locations should have children, but they don't"))? - } - } else if kdl_node_name == "error_config" { - let mut configuration_entries: HashMap = HashMap::new(); - if let Some(children) = children { - if let Some(error_status_code) = kdl_node.entry(0) { - if let Some(error_status_code) = error_status_code.value().as_integer() { - for kdl_node in children.nodes() { - let kdl_node_name = kdl_node.name().value(); + } else if kdl_node_name == "error_config" { + if is_error_config { + Err(anyhow::anyhow!("Nested error configurations aren't allowed"))?; + } + let mut configuration_entries: HashMap = HashMap::new(); + if let Some(children) = children { + if let Some(error_status_code) = kdl_node.entry(0) { + if let Some(error_status_code) = match &error_status_code.value { + kdlite::dom::Value::Integer(i) => Some(*i), + _ => None, + } { + for kdl_node in &children.nodes { + kdl_iterate_fn( + host_filter, + configurations, + &mut configuration_entries, + kdl_node, + conditions, + true, + )?; + } + configurations.push(ServerConfiguration { + entries: configuration_entries, + filters: ServerConfigurationFilters { + is_host: *is_host, + hostname: hostname.clone(), + ip: *ip, + port: *port, + condition: None, + error_handler_status: Some(ErrorHandlerStatus::Status(error_status_code as u16)), + }, + modules: vec![], + observability: ObservabilityBackendChannels::new(), + }); + } else { + Err(anyhow::anyhow!("Invalid error handler status code"))? + } + } else { + for kdl_node in &children.nodes { + let kdl_node_name = kdl_node.name(); let value = kdl_node_to_configuration_entry(kdl_node); if let Some(entries) = configuration_entries.get_mut(kdl_node_name) { entries.inner.push(value); @@ -272,63 +252,45 @@ impl ConfigurationAdapter for YamlLegacyConfigurationAdapter { configurations.push(ServerConfiguration { entries: configuration_entries, filters: ServerConfigurationFilters { - is_host, + is_host: *is_host, hostname: hostname.clone(), - ip, - port, + ip: *ip, + port: *port, condition: None, - error_handler_status: Some(ErrorHandlerStatus::Status(error_status_code as u16)), + error_handler_status: Some(ErrorHandlerStatus::Any), }, modules: vec![], observability: ObservabilityBackendChannels::new(), }); - } else { - Err(anyhow::anyhow!("Invalid error handler status code"))? } } else { - for kdl_node in children.nodes() { - let kdl_node_name = kdl_node.name().value(); - let value = kdl_node_to_configuration_entry(kdl_node); - if let Some(entries) = configuration_entries.get_mut(kdl_node_name) { - entries.inner.push(value); - } else { - configuration_entries.insert( - kdl_node_name.to_string(), - ServerConfigurationEntries { inner: vec![value] }, - ); - } - } - configurations.push(ServerConfiguration { - entries: configuration_entries, - filters: ServerConfigurationFilters { - is_host, - hostname: hostname.clone(), - ip, - port, - condition: None, - error_handler_status: Some(ErrorHandlerStatus::Any), - }, - modules: vec![], - observability: ObservabilityBackendChannels::new(), - }); + Err(anyhow::anyhow!( + "Error handler blocks should have children, but they don't" + ))? } } else { - Err(anyhow::anyhow!( - "Error handler blocks should have children, but they don't" - ))? - } - } else { - let value = kdl_node_to_configuration_entry(kdl_node); - if let Some(entries) = configuration_entries.get_mut(kdl_node_name) { - entries.inner.push(value); - } else { - configuration_entries.insert( - kdl_node_name.to_string(), - ServerConfigurationEntries { inner: vec![value] }, - ); + let value = kdl_node_to_configuration_entry(kdl_node); + if let Some(entries) = configuration_entries.get_mut(kdl_node_name) { + entries.inner.push(value); + } else { + configuration_entries.insert( + kdl_node_name.to_string(), + ServerConfigurationEntries { inner: vec![value] }, + ); + } } + Ok(()) } + kdl_iterate_fn( + &host_filter, + &mut configurations, + &mut configuration_entries, + kdl_node, + &mut None, + false, + )?; } + let (hostname, ip, port, is_host) = host_filter; configurations.push(ServerConfiguration { entries: configuration_entries, filters: ServerConfigurationFilters { @@ -344,7 +306,6 @@ impl ConfigurationAdapter for YamlLegacyConfigurationAdapter { }); } } else { - // "include" directives aren't generated by `ferron-yaml2kdl-core` Err(anyhow::anyhow!("Invalid top-level directive"))? } } From 5ba324f80caa382dce50eb65bf02d54ff6ed5da0 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Thu, 15 Jan 2026 14:02:14 +0100 Subject: [PATCH 2/3] chore: update dependencies to latest versions if possible --- Cargo.lock | 753 ++++++++++++++++++++++++----------------------------- 1 file changed, 347 insertions(+), 406 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0f4632b8..a68dbda8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -121,9 +121,12 @@ checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" [[package]] name = "arc-swap" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" +checksum = "51d03449bb8ca2cc2ef70869af31463d1ae5ccc8fa3e334b307203fbf815207e" +dependencies = [ + "rustversion", +] [[package]] name = "argon2" @@ -196,8 +199,8 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.30" -source = "git+https://github.com/DorianNiemiecSVRJS/async-compression.git?branch=0.4.28#d210ef1a5ded94d657a27427ed51ccca02ff7fef" +version = "0.4.36" +source = "git+https://github.com/DorianNiemiecSVRJS/async-compression.git?branch=0.4.28#047a5ce864dc544ef9d5885ed9e95ccc8cfa3fc6" dependencies = [ "compression-codecs", "compression-core", @@ -226,9 +229,9 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.4.1" +version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" +checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" dependencies = [ "event-listener", "event-listener-strategy", @@ -271,28 +274,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "async-task" version = "4.7.1" @@ -372,9 +353,9 @@ dependencies = [ [[package]] name = "aws-lc-rs" -version = "1.15.2" +version = "1.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88aab2464f1f25453baa7a07c84c5b7684e274054ba06817f382357f77a288" +checksum = "e84ce723ab67259cfeb9877c6a639ee9eb7a27b28123abd71db7f0d5d0cc9d86" dependencies = [ "aws-lc-sys", "untrusted 0.7.1", @@ -383,9 +364,9 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.35.0" +version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45afffdee1e7c9126814751f88dddc747f41d91da16c9551a0f1e8a11e788a1" +checksum = "43a442ece363113bd4bd4c8b18977a7798dd4d3c3383f34fb61936960e8f4ad8" dependencies = [ "cc", "cmake", @@ -551,9 +532,9 @@ dependencies = [ [[package]] name = "aws-smithy-observability" -version = "0.1.5" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f616c3f2260612fe44cede278bafa18e73e6479c4e393e2c4518cf2a9a228a" +checksum = "ef1fcbefc7ece1d70dcce29e490f269695dfca2d2bacdeaf9e5c3f799e4e6a42" dependencies = [ "aws-smithy-runtime-api", ] @@ -570,9 +551,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.9.6" +version = "1.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fda37911905ea4d3141a01364bc5509a0f32ae3f3b22d6e330c0abfb62d247" +checksum = "bb5b6167fcdf47399024e81ac08e795180c576a20e4d4ce67949f9a88ae37dc1" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -594,9 +575,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.9.3" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab0d43d899f9e508300e587bf582ba54c27a452dd0a9ea294690669138ae14a2" +checksum = "efce7aaaf59ad53c5412f14fc19b2d5c6ab2c3ec688d272fd31f76ec12f44fb0" dependencies = [ "aws-smithy-async", "aws-smithy-types", @@ -611,9 +592,9 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.3.5" +version = "1.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905cb13a9895626d49cf2ced759b062d913834c7482c38e49557eac4e6193f01" +checksum = "65f172bcb02424eb94425db8aed1b6d583b5104d4d5ddddf22402c661a320048" dependencies = [ "base64-simd", "bytes", @@ -670,7 +651,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -691,9 +672,9 @@ dependencies = [ [[package]] name = "base64ct" -version = "1.8.1" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e050f626429857a27ddccb31e0aca21356bfa709c04041aefddac081a8f068a" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "bit-set" @@ -710,6 +691,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.10.0" @@ -756,15 +743,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "block2" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" -dependencies = [ - "objc2", -] - [[package]] name = "blocking" version = "1.6.2" @@ -838,9 +816,9 @@ source = "git+https://github.com/DorianNiemiecSVRJS/rust-cache-control.git#2229d [[package]] name = "cc" -version = "1.2.50" +version = "1.2.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f50d563227a1c37cc0a263f64eca3334388c01c5e4c4861a9def205c614383c" +checksum = "cd4932aefd12402b36c60956a4fe0035421f544799057659ff86f923657aada3" dependencies = [ "find-msvc-tools", "jobserver", @@ -868,15 +846,15 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" dependencies = [ "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -897,9 +875,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.53" +version = "4.5.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" +checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" dependencies = [ "clap_builder", "clap_derive", @@ -907,9 +885,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.53" +version = "4.5.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" +checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" dependencies = [ "anstream", "anstyle", @@ -931,9 +909,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" +checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" [[package]] name = "cmake" @@ -962,8 +940,8 @@ dependencies = [ [[package]] name = "compression-codecs" -version = "0.4.30" -source = "git+https://github.com/DorianNiemiecSVRJS/async-compression.git?branch=0.4.28#d210ef1a5ded94d657a27427ed51ccca02ff7fef" +version = "0.4.35" +source = "git+https://github.com/DorianNiemiecSVRJS/async-compression.git?branch=0.4.28#047a5ce864dc544ef9d5885ed9e95ccc8cfa3fc6" dependencies = [ "brotli", "compression-core", @@ -975,8 +953,8 @@ dependencies = [ [[package]] name = "compression-core" -version = "0.4.29" -source = "git+https://github.com/DorianNiemiecSVRJS/async-compression.git?branch=0.4.28#d210ef1a5ded94d657a27427ed51ccca02ff7fef" +version = "0.4.31" +source = "git+https://github.com/DorianNiemiecSVRJS/async-compression.git?branch=0.4.28#047a5ce864dc544ef9d5885ed9e95ccc8cfa3fc6" [[package]] name = "concurrent-queue" @@ -1134,9 +1112,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" +checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" [[package]] name = "der-parser" @@ -1208,16 +1186,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "dispatch2" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" -dependencies = [ - "bitflags", - "objc2", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -1390,7 +1358,7 @@ dependencies = [ "tokio-rustls", "tokio-util", "urlencoding", - "webpki-roots 1.0.4", + "webpki-roots 1.0.5", "winresource", "x509-parser", "xxhash-rust", @@ -1493,7 +1461,7 @@ dependencies = [ "tokio-test", "tokio-util", "urlencoding", - "webpki-roots 1.0.4", + "webpki-roots 1.0.5", ] [[package]] @@ -1515,7 +1483,7 @@ dependencies = [ "rustls-platform-verifier", "tokio", "tokio-util", - "webpki-roots 1.0.4", + "webpki-roots 1.0.5", ] [[package]] @@ -1568,19 +1536,19 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" +checksum = "f449e6c6c08c865631d4890cfacf252b3d396c9bcc83adb6623cdb02a8336c41" [[package]] name = "flate2" -version = "1.1.5" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" dependencies = [ "crc32fast", - "libz-rs-sys", "miniz_oxide", + "zlib-rs", ] [[package]] @@ -1730,9 +1698,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "js-sys", @@ -1781,9 +1749,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" dependencies = [ "atomic-waker", "bytes", @@ -1895,7 +1863,7 @@ checksum = "f8a6fe56c0038198998a6f217ca4e7ef3a5e51f46163bd6dd60b5c71ca6c6502" dependencies = [ "async-trait", "aws-lc-rs", - "bitflags", + "bitflags 2.10.0", "bytes", "cfg-if", "data-encoding", @@ -2021,16 +1989,16 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "human-panic" -version = "2.0.4" +version = "2.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8a07a0957cd4a3cad4a1e4ca7cd5ea07fcacef6ebe2e5d0c7935bfc95120d8" +checksum = "075e8747af11abcff07d55d98297c9c6c70eb5d6365b25e7b12f02e484935191" dependencies = [ "anstream", "anstyle", "backtrace", - "os_info", "serde", "serde_derive", + "sysinfo", "toml", "uuid", ] @@ -2074,7 +2042,7 @@ dependencies = [ "tokio", "tokio-rustls", "tower-service", - "webpki-roots 1.0.4", + "webpki-roots 1.0.5", ] [[package]] @@ -2128,7 +2096,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core", + "windows-core 0.62.2", ] [[package]] @@ -2244,9 +2212,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.12.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", "hashbrown 0.16.1", @@ -2291,12 +2259,11 @@ dependencies = [ [[package]] name = "io-uring" -version = "0.7.11" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd7bddefd0a8833b88a4b68f90dae22c7450d11b354198baee3874fd811b344" +checksum = "595a0399f411a508feb2ec1e970a4a30c249351e30208960d58298de8660b0e5" dependencies = [ - "bitflags", - "cfg-if", + "bitflags 1.3.2", "libc", ] @@ -2320,9 +2287,9 @@ checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "iri-string" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" dependencies = [ "memchr", "serde", @@ -2360,9 +2327,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "jni" @@ -2398,9 +2365,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -2420,9 +2387,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.178" +version = "0.2.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "libmimalloc-sys" @@ -2436,23 +2403,14 @@ dependencies = [ [[package]] name = "libredox" -version = "0.1.11" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df15f6eac291ed1cf25865b1ee60399f57e7c227e7f51bdbd4c5270396a9ed50" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ - "bitflags", + "bitflags 2.10.0", "libc", ] -[[package]] -name = "libz-rs-sys" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15413ef615ad868d4d65dce091cb233b229419c7c0c4bcaa746c0901c49ff39c" -dependencies = [ - "zlib-rs", -] - [[package]] name = "linux-raw-sys" version = "0.11.0" @@ -2537,9 +2495,9 @@ dependencies = [ [[package]] name = "moka" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8261cd88c312e0004c1d51baad2980c66528dfdb2bee62003e643a4d8f86b077" +checksum = "a3dec6bd31b08944e08b58fd99373893a6c17054d6f3ea5006cc894f4f4eee2a" dependencies = [ "crossbeam-channel", "crossbeam-epoch", @@ -2547,7 +2505,6 @@ dependencies = [ "equivalent", "parking_lot", "portable-atomic", - "rustc_version", "smallvec", "tagptr", "uuid", @@ -2556,7 +2513,7 @@ dependencies = [ [[package]] name = "monoio" version = "0.2.4" -source = "git+https://github.com/DorianNiemiecSVRJS/monoio.git#80009e4138bdee088dc2e25fb9cc2b17cec1e7ad" +source = "git+https://github.com/DorianNiemiecSVRJS/monoio.git#ff0af9d5ed7880578b2254fceb3c9eb27d0aafa5" dependencies = [ "auto-const-array", "bytes", @@ -2592,7 +2549,7 @@ dependencies = [ [[package]] name = "monoio-macros" version = "0.1.0" -source = "git+https://github.com/DorianNiemiecSVRJS/monoio.git#80009e4138bdee088dc2e25fb9cc2b17cec1e7ad" +source = "git+https://github.com/DorianNiemiecSVRJS/monoio.git#ff0af9d5ed7880578b2254fceb3c9eb27d0aafa5" dependencies = [ "proc-macro2", "quote", @@ -2624,7 +2581,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags", + "bitflags 2.10.0", "cfg-if", "cfg_aliases", "libc", @@ -2640,6 +2597,15 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "ntapi" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c70f219e21142367c70c0b30c6a9e3a14d55b4d12a204d897fbec83a0363f081" +dependencies = [ + "winapi", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -2693,163 +2659,23 @@ dependencies = [ "libc", ] -[[package]] -name = "objc2" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05" -dependencies = [ - "objc2-encode", -] - -[[package]] -name = "objc2-cloud-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" -dependencies = [ - "bitflags", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-data" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" -dependencies = [ - "objc2", - "objc2-foundation", -] - [[package]] name = "objc2-core-foundation" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags", - "dispatch2", - "objc2", -] - -[[package]] -name = "objc2-core-graphics" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" -dependencies = [ - "bitflags", - "dispatch2", - "objc2", - "objc2-core-foundation", - "objc2-io-surface", -] - -[[package]] -name = "objc2-core-image" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" -dependencies = [ - "objc2", - "objc2-foundation", + "bitflags 2.10.0", ] [[package]] -name = "objc2-core-location" +name = "objc2-io-kit" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" +checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" dependencies = [ - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-text" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" -dependencies = [ - "bitflags", - "objc2", - "objc2-core-foundation", - "objc2-core-graphics", -] - -[[package]] -name = "objc2-encode" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" - -[[package]] -name = "objc2-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" -dependencies = [ - "bitflags", - "block2", "libc", - "objc2", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-io-surface" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" -dependencies = [ - "bitflags", - "objc2", - "objc2-core-foundation", -] - -[[package]] -name = "objc2-quartz-core" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" -dependencies = [ - "bitflags", - "objc2", - "objc2-core-foundation", - "objc2-foundation", -] - -[[package]] -name = "objc2-ui-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" -dependencies = [ - "bitflags", - "block2", - "objc2", - "objc2-cloud-kit", - "objc2-core-data", "objc2-core-foundation", - "objc2-core-graphics", - "objc2-core-image", - "objc2-core-location", - "objc2-core-text", - "objc2-foundation", - "objc2-quartz-core", - "objc2-user-notifications", -] - -[[package]] -name = "objc2-user-notifications" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" -dependencies = [ - "objc2", - "objc2-foundation", ] [[package]] @@ -2912,9 +2738,9 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "openssl-probe" -version = "0.1.6" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +checksum = "9f50d9b3dabb09ecd771ad0aa242ca6894994c130308ca3d7684634df8037391" [[package]] name = "opentelemetry" @@ -3003,22 +2829,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "os_info" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4022a17595a00d6a369236fdae483f0de7f0a339960a53118b818238e132224" -dependencies = [ - "android_system_properties", - "log", - "nix", - "objc2", - "objc2-foundation", - "objc2-ui-kit", - "serde", - "windows-sys 0.61.2", -] - [[package]] name = "outref" version = "0.5.2" @@ -3051,7 +2861,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -3061,7 +2871,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a2a4764cc1f8d961d802af27193c6f4f0124bd0e76e8393cf818e18880f0524" dependencies = [ "argon2", - "getrandom 0.2.16", + "getrandom 0.2.17", "password-hash", "pbkdf2", "rand_core 0.6.4", @@ -3191,9 +3001,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f59e70c4aef1e55797c2e8fd94a4f2a973fc972cfde0e0b05f683667b0cd39dd" +checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" [[package]] name = "potential_utf" @@ -3230,9 +3040,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.103" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" +checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" dependencies = [ "unicode-ident", ] @@ -3243,7 +3053,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25485360a54d6861439d60facef26de713b1e126bf015ec8f98239467a2b82f7" dependencies = [ - "bitflags", + "bitflags 2.10.0", "procfs-core", "rustix", ] @@ -3254,7 +3064,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6401bf7b6af22f78b563665d15a22e9aef27775b79b149a66ca022468a4e405" dependencies = [ - "bitflags", + "bitflags 2.10.0", "hex", ] @@ -3264,7 +3074,7 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bee689443a2bd0a16ab0348b52ee43e3b2d1b1f931c8aa5c9f8de4c86fbe8c40" dependencies = [ - "bitflags", + "bitflags 2.10.0", "num-traits", "rand", "rand_chacha", @@ -3275,9 +3085,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" +checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" dependencies = [ "bytes", "prost-derive", @@ -3285,9 +3095,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" +checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" dependencies = [ "anyhow", "itertools 0.14.0", @@ -3367,9 +3177,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.42" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" +checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" dependencies = [ "proc-macro2", ] @@ -3403,7 +3213,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -3413,7 +3223,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -3422,14 +3232,14 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", ] [[package]] name = "rand_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ "getrandom 0.3.4", ] @@ -3440,14 +3250,14 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" dependencies = [ - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] name = "rasn" -version = "0.28.1" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bae6a9d0997284956e6340ba878ff27ac97edd16c10c7217dd13f4f55a4dd9" +checksum = "f7e60e4278c83c1cabefaadba960f3ad8b5ea4433b5e61832f4fec1b9b73bfeb" dependencies = [ "bitvec", "bitvec-nom2", @@ -3468,9 +3278,9 @@ dependencies = [ [[package]] name = "rasn-derive" -version = "0.28.1" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d30671578ceaa2eaae5169bd47dfb8270cc8200b9c43401c9a23629b840102b" +checksum = "42423ab7e8d4caa3825e230e9abbe023da70ebff16f62a28f26955dcc9a6c112" dependencies = [ "proc-macro2", "rasn-derive-impl", @@ -3479,9 +3289,9 @@ dependencies = [ [[package]] name = "rasn-derive-impl" -version = "0.28.1" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4f81181ec7120b423997cda0d08758d153077458ec80276ff9f6acb93d308a" +checksum = "d1d159ba108228880d7f845384825415e186c497b13e1246eedb834f18aad10e" dependencies = [ "either", "itertools 0.13.0", @@ -3493,9 +3303,9 @@ dependencies = [ [[package]] name = "rasn-ocsp" -version = "0.28.1" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05bd201bac785535bd00fd00646fe1787bb25ca8d7c928fbfc5f129ae37ffd53" +checksum = "ddc07b72eaa18d6fb7eb4cbd576d22c437f2c6246c7c2ddda85e63ea6bd58154" dependencies = [ "rasn", "rasn-pkix", @@ -3503,9 +3313,9 @@ dependencies = [ [[package]] name = "rasn-pkix" -version = "0.28.1" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99f6de65b70491a57cbc25810a2627e870cd9befbba220ae8430c5ad7f62a2" +checksum = "ca4908ad52c96a30d101b87f0b2786c3352f133df238f248c56d0be24419274b" dependencies = [ "rasn", ] @@ -3556,7 +3366,7 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags", + "bitflags 2.10.0", ] [[package]] @@ -3565,7 +3375,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "libredox", "thiserror 2.0.17", ] @@ -3625,9 +3435,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.26" +version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b4c14b2d9afca6a60277086b0cc6a6ae0b568f6f7916c943a8cdc79f8be240f" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ "base64", "bytes", @@ -3660,7 +3470,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 1.0.4", + "webpki-roots 1.0.5", ] [[package]] @@ -3683,7 +3493,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.16", + "getrandom 0.2.17", "libc", "untrusted 0.9.0", "windows-sys 0.52.0", @@ -3742,11 +3552,11 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ - "bitflags", + "bitflags 2.10.0", "errno", "libc", "linux-raw-sys", @@ -3755,9 +3565,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.35" +version = "0.23.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" +checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" dependencies = [ "aws-lc-rs", "log", @@ -3770,9 +3580,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9980d917ebb0c0536119ba501e90834767bffc3d60641457fd84a1f3fd337923" +checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" dependencies = [ "openssl-probe", "rustls-pki-types", @@ -3837,9 +3647,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" [[package]] name = "salsa20" @@ -3912,7 +3722,7 @@ version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" dependencies = [ - "bitflags", + "bitflags 2.10.0", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -3967,15 +3777,15 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -4047,10 +3857,11 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.7" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] @@ -4143,9 +3954,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.111" +version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ "proc-macro2", "quote", @@ -4172,13 +3983,27 @@ dependencies = [ "syn", ] +[[package]] +name = "sysinfo" +version = "0.37.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16607d5caffd1c07ce073528f9ed972d88db15dd44023fa57142963be3feb11f" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows", +] + [[package]] name = "system-configuration" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags", + "bitflags 2.10.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -4256,9 +4081,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.44" +version = "0.3.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" dependencies = [ "deranged", "itoa", @@ -4266,22 +4091,22 @@ dependencies = [ "num-conv", "num_threads", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" +checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" [[package]] name = "time-macros" -version = "0.2.24" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd" dependencies = [ "num-conv", "time-core", @@ -4320,9 +4145,9 @@ checksum = "43b432f4112b803f1ced6a45a6639965e6ac7b43e9f39cf758121848300ed525" [[package]] name = "tokio" -version = "1.48.0" +version = "1.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" dependencies = [ "bytes", "libc", @@ -4358,9 +4183,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" dependencies = [ "futures-core", "pin-project-lite", @@ -4369,12 +4194,10 @@ dependencies = [ [[package]] name = "tokio-test" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2468baabc3311435b55dd935f702f42cd1b8abb7e754fb7dfb16bd36aa88f9f7" +checksum = "3f6d24790a10a7af737693a3e8f1d03faef7e6ca0cc99aae5066f533766de545" dependencies = [ - "async-stream", - "bytes", "futures-core", "tokio", "tokio-stream", @@ -4382,9 +4205,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.17" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", @@ -4399,9 +4222,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.9.10+spec-1.1.0" +version = "0.9.11+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0825052159284a1a8b4d6c0c86cbc801f2da5afd2b225fa548c72f2e74002f48" +checksum = "f3afc9a848309fe1aaffaed6e1546a7a14de1f935dc9d89d32afd9a44bab7c46" dependencies = [ "indexmap", "serde_core", @@ -4475,9 +4298,9 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", @@ -4498,7 +4321,7 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ - "bitflags", + "bitflags 2.10.0", "bytes", "futures-util", "http 1.4.0", @@ -4599,9 +4422,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" -version = "2.8.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-ident" @@ -4635,9 +4458,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.7" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", @@ -4723,9 +4546,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -4736,11 +4559,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.56" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -4749,9 +4573,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4759,9 +4583,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ "bumpalo", "proc-macro2", @@ -4772,18 +4596,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -4801,9 +4625,9 @@ dependencies = [ [[package]] name = "webpki-root-certs" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee3e3b5f5e80bc89f30ce8d0343bf4e5f12341c51f3e26cbeecbc7c85443e85b" +checksum = "36a29fc0408b113f68cf32637857ab740edfafdf460c326cd2afaa2d84cc05dc" dependencies = [ "rustls-pki-types", ] @@ -4814,14 +4638,14 @@ version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.4", + "webpki-roots 1.0.5", ] [[package]] name = "webpki-roots" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e" +checksum = "12bed680863276c63889429bfd6cab3b99943659923822de1c8a39c49e4d722c" dependencies = [ "rustls-pki-types", ] @@ -4832,6 +4656,22 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.11" @@ -4841,6 +4681,47 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.61.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" +dependencies = [ + "windows-collections", + "windows-core 0.61.2", + "windows-future", + "windows-link 0.1.3", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" +dependencies = [ + "windows-core 0.61.2", +] + +[[package]] +name = "windows-core" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link 0.1.3", + "windows-result 0.3.4", + "windows-strings 0.4.2", +] + [[package]] name = "windows-core" version = "0.62.2" @@ -4849,9 +4730,20 @@ checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement", "windows-interface", - "windows-link", - "windows-result", - "windows-strings", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-future" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", + "windows-threading", ] [[package]] @@ -4876,21 +4768,46 @@ dependencies = [ "syn", ] +[[package]] +name = "windows-link" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" +[[package]] +name = "windows-numerics" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" +dependencies = [ + "windows-core 0.61.2", + "windows-link 0.1.3", +] + [[package]] name = "windows-registry" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" dependencies = [ - "windows-link", - "windows-result", - "windows-strings", + "windows-link 0.2.1", + "windows-result 0.4.1", + "windows-strings 0.5.1", +] + +[[package]] +name = "windows-result" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +dependencies = [ + "windows-link 0.1.3", ] [[package]] @@ -4899,7 +4816,16 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link", + "windows-link 0.2.1", +] + +[[package]] +name = "windows-strings" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +dependencies = [ + "windows-link 0.1.3", ] [[package]] @@ -4908,7 +4834,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -4962,7 +4888,7 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link", + "windows-link 0.2.1", ] [[package]] @@ -5017,7 +4943,7 @@ version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link", + "windows-link 0.2.1", "windows_aarch64_gnullvm 0.53.1", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", @@ -5028,6 +4954,15 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] +[[package]] +name = "windows-threading" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" +dependencies = [ + "windows-link 0.1.3", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -5226,9 +5161,9 @@ dependencies = [ [[package]] name = "winresource" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b021990998587d4438bb672b5c5f034cbc927f51b45e3807ab7323645ef4899" +checksum = "17cdfa8da4b111045a5e47c7c839e6c5e11c942de1309bc624393ed5d87f89c6" dependencies = [ "toml", "version_check", @@ -5336,18 +5271,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.31" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" +checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.31" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" +checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" dependencies = [ "proc-macro2", "quote", @@ -5416,9 +5351,15 @@ dependencies = [ [[package]] name = "zlib-rs" -version = "0.5.4" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40990edd51aae2c2b6907af74ffb635029d5788228222c4bb811e9351c0caad3" + +[[package]] +name = "zmij" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51f936044d677be1a1168fae1d03b583a285a5dd9d8cbf7b24c23aa1fc775235" +checksum = "bd8f3f50b848df28f887acb68e41201b5aea6bc8a8dacc00fb40635ff9a72fea" [[package]] name = "zstd" From 7331128ce054e4b25ee8a99adf6ebf52739f1319 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Thu, 15 Jan 2026 14:05:51 +0100 Subject: [PATCH 3/3] chore: regenerate Cargo.lock --- Cargo.lock | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.lock b/Cargo.lock index 784f3ebc..a5976dff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1460,6 +1460,7 @@ dependencies = [ "tokio-util", "urlencoding", "webpki-roots 1.0.5", + "xxhash-rust", ] [[package]]