From 391d31d4e2f4465d7911bf66acefc532d6d1cd98 Mon Sep 17 00:00:00 2001 From: Cal Courtney Date: Mon, 16 Mar 2026 09:24:36 +0000 Subject: [PATCH 1/9] ci: add strict clippy rules --- .github/workflows/ci.yml | 35 +-- Cargo.toml | 46 ++++ clippy.toml | 2 + src/assigner.rs | 18 +- src/context.rs | 395 ++++++++++++++++++--------- src/jsonexpr/evaluator.rs | 124 ++++++--- src/jsonexpr/mod.rs | 13 +- src/jsonexpr/operators/mod.rs | 490 +++++++++++++++++++++++++--------- src/lib.rs | 31 ++- src/matcher.rs | 34 ++- src/md5.rs | 3 + src/models.rs | 86 ++++++ src/murmur3.rs | 47 ++-- src/sdk.rs | 103 ++++--- src/utils.rs | 13 +- 15 files changed, 1063 insertions(+), 377 deletions(-) create mode 100644 clippy.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a9ca30..00d4fa0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [main, master] + branches: [main] pull_request: - branches: [main, master] + branches: [main] env: CARGO_TERM_COLOR: always @@ -17,29 +17,19 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - rust: [stable, 1.70.0] + rust: [stable, "1.70.0"] steps: - uses: actions/checkout@v4 - name: Install Rust - uses: dtolnay/rust-action@stable + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - name: Cache cargo registry - uses: actions/cache@v4 + - uses: Swatinem/rust-cache@v2 with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo-${{ matrix.rust }}- - - - name: Build - run: cargo build --verbose + key: ${{ matrix.rust }} - name: Run tests run: cargo test --verbose @@ -51,11 +41,12 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust - uses: dtolnay/rust-action@stable + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + - name: Check formatting run: cargo fmt --all -- --check @@ -69,11 +60,11 @@ jobs: - uses: actions/checkout@v4 - name: Install Rust - uses: dtolnay/rust-action@stable - with: - toolchain: stable + uses: dtolnay/rust-toolchain@stable + + - uses: Swatinem/rust-cache@v2 - name: Check documentation run: cargo doc --no-deps --document-private-items env: - RUSTDOCFLAGS: -D warnings + RUSTDOCFLAGS: "-Dwarnings" diff --git a/Cargo.toml b/Cargo.toml index 4350624..49ed17a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,52 @@ readme = "README.md" keywords = ["absmartly", "ab-testing", "feature-flags", "experimentation", "sdk"] categories = ["development-tools", "web-programming"] exclude = [".github/", "target/", ".claude/"] +rust-version = "1.70" + +[lints.rust] +unsafe_code = "forbid" +missing_docs = "warn" +missing_debug_implementations = "warn" +unreachable_pub = "warn" +unused_qualifications = "warn" +unused_results = "warn" + +[lints.clippy] +correctness = { level = "deny", priority = -1 } +suspicious = { level = "deny", priority = -1 } + +style = { level = "warn", priority = -1 } +complexity = { level = "warn", priority = -1 } +perf = { level = "warn", priority = -1 } + +pedantic = { level = "warn", priority = -1 } + +module_name_repetitions = "allow" +must_use_candidate = "allow" + +unwrap_used = "warn" +expect_used = "warn" +panic = "warn" +todo = "warn" +unimplemented = "warn" +dbg_macro = "warn" +print_stdout = "warn" +print_stderr = "warn" +wildcard_imports = "warn" +enum_glob_use = "warn" +rc_buffer = "warn" +str_to_string = "warn" +string_to_string = "warn" +inefficient_to_string = "warn" +implicit_clone = "warn" +needless_pass_by_value = "warn" +redundant_closure_for_method_calls = "warn" +semicolon_if_nothing_returned = "warn" +doc_markdown = "warn" +manual_let_else = "warn" +match_wildcard_for_single_variants = "warn" +missing_errors_doc = "warn" +missing_panics_doc = "warn" [dependencies] serde = { version = "1.0", features = ["derive"] } diff --git a/clippy.toml b/clippy.toml new file mode 100644 index 0000000..dfe0b66 --- /dev/null +++ b/clippy.toml @@ -0,0 +1,2 @@ +msrv = "1.70" +doc-valid-idents = ["ABsmartly", "GitHub", "JavaScript", "TypeScript"] diff --git a/src/assigner.rs b/src/assigner.rs index cae3df7..c3b3043 100644 --- a/src/assigner.rs +++ b/src/assigner.rs @@ -1,16 +1,22 @@ +//! Deterministic variant assignment based on unit hashing. + use crate::murmur3::murmur3_32; use crate::utils::choose_variant; +/// Assigns experiment variants deterministically based on a hashed unit identifier. +#[derive(Debug)] pub struct VariantAssigner { unit_hash: u32, } impl VariantAssigner { + /// Creates a new assigner from a unit identifier string. pub fn new(unit: &str) -> Self { let unit_hash = murmur3_32(unit.as_bytes(), 0); Self { unit_hash } } + /// Assigns a variant index based on the split weights and experiment seeds. pub fn assign(&self, split: &[f64], seed_hi: u32, seed_lo: u32) -> usize { let prob = self.probability(seed_hi, seed_lo); choose_variant(split, prob) @@ -23,7 +29,7 @@ impl VariantAssigner { buffer[8..12].copy_from_slice(&self.unit_hash.to_le_bytes()); let hash = murmur3_32(&buffer, 0); - (hash as f64) / (0xFFFFFFFFu32 as f64) + f64::from(hash) / f64::from(0xFFFF_FFFFu32) } } @@ -36,7 +42,7 @@ mod tests { fn test_assigner_bleh_email() { let hashed_unit = hash_unit("bleh@absmartly.com"); let assigner = VariantAssigner::new(&hashed_unit); - let variant = assigner.assign(&[0.5, 0.5], 0x00000000, 0x00000000); + let variant = assigner.assign(&[0.5, 0.5], 0x0000_0000, 0x0000_0000); assert_eq!(variant, 0); } @@ -44,7 +50,7 @@ mod tests { fn test_assigner_bleh_email_different_seed() { let hashed_unit = hash_unit("bleh@absmartly.com"); let assigner = VariantAssigner::new(&hashed_unit); - let variant = assigner.assign(&[0.5, 0.5], 0x00000000, 0x00000001); + let variant = assigner.assign(&[0.5, 0.5], 0x0000_0000, 0x0000_0001); assert_eq!(variant, 1); } @@ -52,15 +58,15 @@ mod tests { fn test_assigner_123456789() { let hashed_unit = hash_unit("123456789"); let assigner = VariantAssigner::new(&hashed_unit); - assert_eq!(assigner.assign(&[0.5, 0.5], 0x00000000, 0x00000000), 1); - assert_eq!(assigner.assign(&[0.5, 0.5], 0x00000000, 0x00000001), 0); + assert_eq!(assigner.assign(&[0.5, 0.5], 0x0000_0000, 0x0000_0000), 1); + assert_eq!(assigner.assign(&[0.5, 0.5], 0x0000_0000, 0x0000_0001), 0); } #[test] fn test_assigner_three_way_split() { let hashed_unit = hash_unit("bleh@absmartly.com"); let assigner = VariantAssigner::new(&hashed_unit); - let variant = assigner.assign(&[0.33, 0.33, 0.34], 0x00000000, 0x00000001); + let variant = assigner.assign(&[0.33, 0.33, 0.34], 0x0000_0000, 0x0000_0001); assert_eq!(variant, 2); } } diff --git a/src/context.rs b/src/context.rs index a7abce8..237156f 100644 --- a/src/context.rs +++ b/src/context.rs @@ -1,12 +1,18 @@ +//! Experiment context for managing assignments, exposures, and goal tracking. + use serde_json::Value; use std::collections::HashMap; use std::time::{SystemTime, UNIX_EPOCH}; use crate::assigner::VariantAssigner; use crate::matcher::AudienceMatcher; -use crate::models::*; +use crate::models::{ + Assignment, Attribute, ContextData, ContextState, ExperimentData, Exposure, Goal, + PublishParams, Unit, +}; use crate::utils::{array_equals_shallow, hash_unit}; +/// Callback type for logging context events. pub type EventLogger = Box) + Send + Sync>; struct Experiment { @@ -14,6 +20,23 @@ struct Experiment { variables: Vec>, } +impl std::fmt::Debug for Experiment { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Experiment") + .field("data", &self.data) + .field("variables", &self.variables) + .finish() + } +} + +/// The main context for interacting with ABsmartly experiments. +/// +/// A context holds unit assignments, tracks exposures and goals, and resolves +/// experiment variables. Create one via [`SDK::create_context`] or +/// [`SDK::create_context_with`]. +/// +/// [`SDK::create_context`]: crate::sdk::SDK::create_context +/// [`SDK::create_context_with`]: crate::sdk::SDK::create_context_with pub struct Context { units: HashMap, attrs: Vec, @@ -34,7 +57,19 @@ pub struct Context { event_logger: Option, } +impl std::fmt::Debug for Context { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("Context") + .field("units", &self.units) + .field("state", &self.state) + .field("pending", &self.pending) + .field("data", &self.data) + .finish_non_exhaustive() + } +} + impl Context { + /// Creates a new context initialized with the given experiment data. pub fn new(data: ContextData) -> Self { let mut ctx = Self { units: HashMap::new(), @@ -60,6 +95,7 @@ impl Context { ctx } + /// Sets an event logger callback for observing context events. pub fn set_event_logger(&mut self, logger: EventLogger) { self.event_logger = Some(logger); } @@ -95,7 +131,7 @@ impl Context { variables.push(parsed); } - self.index.insert( + let _ = self.index.insert( experiment.name.clone(), Experiment { data: experiment.clone(), @@ -105,53 +141,75 @@ impl Context { } } + /// Returns true if the context is ready for use. pub fn is_ready(&self) -> bool { self.state == ContextState::Ready } + /// Returns true if the context failed to initialize. pub fn is_failed(&self) -> bool { self.state == ContextState::Failed } + /// Returns true if the context has been finalized. pub fn is_finalized(&self) -> bool { self.state == ContextState::Finalized } + /// Returns true if the context is currently finalizing. pub fn is_finalizing(&self) -> bool { self.state == ContextState::Finalizing } + /// Returns the number of pending events waiting to be published. pub fn pending(&self) -> usize { self.pending } + fn check_not_finalized(&self) -> Result<(), String> { + if self.is_finalized() { + return Err("ABSmartly Context is finalized.".to_owned()); + } + if self.is_finalizing() { + return Err("ABSmartly Context is finalizing.".to_owned()); + } + Ok(()) + } + + /// Returns a reference to the context's experiment data. pub fn data(&self) -> &ContextData { &self.data } + /// Sets a unit identifier for the given unit type. + /// + /// # Errors + /// + /// Returns an error if the context is finalized/finalizing, the UID is blank, + /// or a different UID is already set for this unit type. pub fn set_unit(&mut self, unit_type: &str, uid: &str) -> Result<(), String> { - if self.is_finalized() { - return Err("ABSmartly Context is finalized.".to_string()); - } - if self.is_finalizing() { - return Err("ABSmartly Context is finalizing.".to_string()); - } + self.check_not_finalized()?; let uid = uid.trim(); if uid.is_empty() { - return Err(format!("Unit '{}' UID must not be blank.", unit_type)); + return Err(format!("Unit '{unit_type}' UID must not be blank.")); } if let Some(existing) = self.units.get(unit_type) { if existing != uid { - return Err(format!("Unit '{}' UID already set.", unit_type)); + return Err(format!("Unit '{unit_type}' UID already set.")); } } - self.units.insert(unit_type.to_string(), uid.to_string()); + let _ = self.units.insert(unit_type.to_owned(), uid.to_owned()); Ok(()) } + /// Sets multiple unit identifiers at once. + /// + /// # Errors + /// + /// Returns an error if any individual `set_unit` call fails. pub fn set_units(&mut self, units: I) -> Result<(), String> where I: IntoIterator, @@ -164,24 +222,26 @@ impl Context { Ok(()) } + /// Returns the UID for the given unit type, if set. pub fn get_unit(&self, unit_type: &str) -> Option<&String> { self.units.get(unit_type) } + /// Returns all unit type to UID mappings. pub fn get_units(&self) -> &HashMap { &self.units } + /// Sets a context attribute. + /// + /// # Errors + /// + /// Returns an error if the context is finalized or finalizing. pub fn set_attribute(&mut self, name: &str, value: impl Into) -> Result<(), String> { - if self.is_finalized() { - return Err("ABSmartly Context is finalized.".to_string()); - } - if self.is_finalizing() { - return Err("ABSmartly Context is finalizing.".to_string()); - } + self.check_not_finalized()?; self.attrs.push(Attribute { - name: name.to_string(), + name: name.to_owned(), value: value.into(), set_at: now_millis(), }); @@ -189,18 +249,18 @@ impl Context { Ok(()) } + /// Sets multiple context attributes at once. + /// + /// # Errors + /// + /// Returns an error if the context is finalized or finalizing. pub fn set_attributes(&mut self, attrs: I) -> Result<(), String> where I: IntoIterator, K: Into, V: Into, { - if self.is_finalized() { - return Err("ABSmartly Context is finalized.".to_string()); - } - if self.is_finalizing() { - return Err("ABSmartly Context is finalizing.".to_string()); - } + self.check_not_finalized()?; let set_at = now_millis(); for (name, value) in attrs { @@ -214,6 +274,7 @@ impl Context { Ok(()) } + /// Returns the most recently set value for the given attribute name. pub fn get_attribute(&self, name: &str) -> Option<&Value> { self.attrs .iter() @@ -222,40 +283,53 @@ impl Context { .map(|a| &a.value) } + /// Returns all attributes as a map (last-write-wins for duplicate names). pub fn get_attributes(&self) -> HashMap { let mut attrs = HashMap::new(); for attr in &self.attrs { - attrs.insert(attr.name.clone(), attr.value.clone()); + let _ = attrs.insert(attr.name.clone(), attr.value.clone()); } attrs } + /// Sets an override for the given experiment, forcing a specific variant. pub fn set_override(&mut self, experiment_name: &str, variant: i32) { - self.overrides.insert(experiment_name.to_string(), variant); + let _ = self.overrides.insert(experiment_name.to_owned(), variant); } + /// Sets multiple experiment overrides at once. pub fn set_overrides(&mut self, overrides: I) where I: IntoIterator, K: Into, { for (experiment_name, variant) in overrides { - self.overrides.insert(experiment_name.into(), variant); + let _ = self.overrides.insert(experiment_name.into(), variant); } } - pub fn set_custom_assignment(&mut self, experiment_name: &str, variant: i32) -> Result<(), String> { - if self.is_finalized() { - return Err("ABSmartly Context is finalized.".to_string()); - } - if self.is_finalizing() { - return Err("ABSmartly Context is finalizing.".to_string()); - } - self.cassignments - .insert(experiment_name.to_string(), variant); + /// Sets a custom assignment for the given experiment. + /// + /// # Errors + /// + /// Returns an error if the context is finalized or finalizing. + pub fn set_custom_assignment( + &mut self, + experiment_name: &str, + variant: i32, + ) -> Result<(), String> { + self.check_not_finalized()?; + let _ = self + .cassignments + .insert(experiment_name.to_owned(), variant); Ok(()) } + /// Sets multiple custom assignments at once. + /// + /// # Errors + /// + /// Returns an error if any individual assignment fails. pub fn set_custom_assignments(&mut self, assignments: I) -> Result<(), String> where I: IntoIterator, @@ -267,10 +341,12 @@ impl Context { Ok(()) } + /// Returns the assigned variant for an experiment without recording an exposure. pub fn peek(&mut self, experiment_name: &str) -> i32 { self.assign(experiment_name).variant } + /// Returns the assigned variant for an experiment and records an exposure. pub fn treatment(&mut self, experiment_name: &str) -> i32 { let assignment = self.assign(experiment_name); let variant = assignment.variant; @@ -285,33 +361,37 @@ impl Context { variant } + /// Records a goal achievement event. + /// + /// # Errors + /// + /// Returns an error if the context is finalized or finalizing. pub fn track(&mut self, goal_name: &str, properties: impl Into) -> Result<(), String> { - if self.is_finalized() { - return Err("ABSmartly Context is finalized.".to_string()); - } - if self.is_finalizing() { - return Err("ABSmartly Context is finalizing.".to_string()); - } + self.check_not_finalized()?; let properties_map: Option> = match properties.into() { Value::Object(map) => Some(map.into_iter().collect()), - Value::Null => None, _ => None, }; let goal = Goal { - name: goal_name.to_string(), + name: goal_name.to_owned(), properties: properties_map, achieved_at: now_millis(), }; - self.log_event("goal", Some(serde_json::to_value(&goal).unwrap_or_default())); + self.log_event( + "goal", + Some(serde_json::to_value(&goal).unwrap_or_default()), + ); self.goals.push(goal); self.pending += 1; Ok(()) } + /// Returns the variable value for the given key, falling back to the default. + /// Records an exposure for the experiment that provides the variable. pub fn variable_value(&mut self, key: &str, default_value: impl Into) -> Value { if let Some(experiment_names) = self.index_variables.get(key).cloned() { for exp_name in experiment_names { @@ -335,6 +415,7 @@ impl Context { default_value.into() } + /// Returns the variable value for the given key without recording an exposure. pub fn peek_variable_value(&mut self, key: &str, default_value: impl Into) -> Value { if let Some(experiment_names) = self.index_variables.get(key).cloned() { for exp_name in experiment_names { @@ -351,89 +432,100 @@ impl Context { default_value.into() } + /// Returns a map of variable keys to the experiment names that provide them. pub fn variable_keys(&self) -> HashMap> { - let mut result = HashMap::new(); - for (key, exp_names) in &self.index_variables { - result.insert(key.clone(), exp_names.clone()); - } - result + self.index_variables.clone() } + /// Returns a custom field value for the given experiment and field name. pub fn custom_field_value(&self, experiment_name: &str, field_name: &str) -> Option { - if let Some(exp) = self.index.get(experiment_name) { - if let Some(ref custom_fields) = exp.data.custom_field_values { - if let Some(field) = custom_fields.iter().find(|f| f.name == field_name) { - return match field.field_type.as_str() { - "text" | "string" => Some(Value::String(field.value.clone())), - "number" => field.value.parse::().ok().map(|n| { - serde_json::Number::from_f64(n) - .map(Value::Number) - .unwrap_or(Value::Null) - }), - "json" => { - if field.value == "null" { - Some(Value::Null) - } else if field.value.is_empty() { - Some(Value::String(String::new())) - } else { - serde_json::from_str(&field.value).ok() - } - } - "boolean" => Some(Value::Bool(field.value == "true")), - _ => None, - }; + let exp = self.index.get(experiment_name)?; + let custom_fields = exp.data.custom_field_values.as_ref()?; + let field = custom_fields.iter().find(|f| f.name == field_name)?; + + match field.field_type.as_str() { + "text" | "string" => Some(Value::String(field.value.clone())), + "number" => field + .value + .parse::() + .ok() + .map(|n| serde_json::Number::from_f64(n).map_or(Value::Null, Value::Number)), + "json" => { + if field.value == "null" { + Some(Value::Null) + } else if field.value.is_empty() { + Some(Value::String(String::new())) + } else { + serde_json::from_str(&field.value).ok() } } + "boolean" => Some(Value::Bool(field.value == "true")), + _ => None, } - None } - pub fn custom_field_value_type(&self, experiment_name: &str, field_name: &str) -> Option { - if let Some(exp) = self.index.get(experiment_name) { - if let Some(ref custom_fields) = exp.data.custom_field_values { - if let Some(field) = custom_fields.iter().find(|f| f.name == field_name) { - return Some(field.field_type.clone()); - } - } - } - None + /// Returns the type of a custom field for the given experiment and field name. + pub fn custom_field_value_type( + &self, + experiment_name: &str, + field_name: &str, + ) -> Option { + let exp = self.index.get(experiment_name)?; + let custom_fields = exp.data.custom_field_values.as_ref()?; + let field = custom_fields.iter().find(|f| f.name == field_name)?; + Some(field.field_type.clone()) } + /// Returns all unique custom field names across all experiments. pub fn custom_field_keys(&self) -> Vec { let mut keys = std::collections::HashSet::new(); for exp in &self.data.experiments { if let Some(ref custom_fields) = exp.custom_field_values { for field in custom_fields { - keys.insert(field.name.clone()); + let _ = keys.insert(field.name.clone()); } } } keys.into_iter().collect() } + /// Returns the names of all experiments in the context. pub fn experiments(&self) -> Vec { - self.data.experiments.iter().map(|e| e.name.clone()).collect() + self.data + .experiments + .iter() + .map(|e| e.name.clone()) + .collect() } + /// Refreshes the context with new experiment data, clearing all cached assignments. pub fn refresh(&mut self, new_data: ContextData) { self.assignments.clear(); self.init(new_data); - self.log_event("refresh", Some(serde_json::to_value(&self.data).unwrap_or_default())); + self.log_event( + "refresh", + Some(serde_json::to_value(&self.data).unwrap_or_default()), + ); } + /// Publishes all pending events (exposures, goals, attributes). pub fn publish(&mut self) { if self.pending == 0 { return; } let params = self.build_publish_params(); - self.log_event("publish", Some(serde_json::to_value(¶ms).unwrap_or_default())); + self.log_event( + "publish", + Some(serde_json::to_value(¶ms).unwrap_or_default()), + ); self.pending = 0; self.exposures.clear(); self.goals.clear(); } + /// Finalizes the context, publishing any pending events and preventing further mutations. pub fn finalize(&mut self) { if self.is_finalized() { return; @@ -449,6 +541,7 @@ impl Context { self.log_event("finalize", None); } + #[allow(clippy::too_many_lines)] fn assign(&mut self, experiment_name: &str) -> Assignment { let has_custom = self.cassignments.contains_key(experiment_name); let has_override = self.overrides.contains_key(experiment_name); @@ -465,7 +558,7 @@ impl Context { } } else if !has_custom || self.cassignments[experiment_name] == cached.variant { if let Some(exp) = self.index.get(experiment_name) { - if self.experiment_matches(&exp.data, cached) + if Self::experiment_matches(&exp.data, cached) && self.audience_matches(&exp.data, cached) { return cached.clone(); @@ -484,7 +577,7 @@ impl Context { if has_override { if let Some(ref exp_data) = exp_data_opt { assignment.id = exp_data.id; - assignment.unit_type = exp_data.unit_type.clone(); + assignment.unit_type.clone_from(&exp_data.unit_type); } assignment.overridden = true; @@ -525,11 +618,16 @@ impl Context { assignment.variant = self.cassignments[experiment_name]; assignment.custom = true; } else { - assignment.variant = assigner.assign( + #[allow( + clippy::cast_possible_truncation, + clippy::cast_possible_wrap + )] + let v = assigner.assign( &exp_data.split, exp_data.seed_hi, exp_data.seed_lo, ) as i32; + assignment.variant = v; } } else { assignment.variant = 0; @@ -540,11 +638,13 @@ impl Context { } else { assignment.assigned = true; assignment.eligible = true; - assignment.variant = exp_data.full_on_variant as i32; + #[allow(clippy::cast_possible_truncation, clippy::cast_possible_wrap)] + let v = exp_data.full_on_variant as i32; + assignment.variant = v; assignment.full_on = true; } - assignment.unit_type = exp_data.unit_type.clone(); + assignment.unit_type.clone_from(&exp_data.unit_type); assignment.id = exp_data.id; assignment.iteration = exp_data.iteration; assignment.traffic_split = Some(exp_data.traffic_split.clone()); @@ -553,17 +653,20 @@ impl Context { } if let Some(exp) = self.index.get(experiment_name) { - if (assignment.variant as usize) < exp.variables.len() { - assignment.variables = Some(exp.variables[assignment.variant as usize].clone()); + #[allow(clippy::cast_sign_loss)] + let variant_idx = assignment.variant as usize; + if variant_idx < exp.variables.len() { + assignment.variables = Some(exp.variables[variant_idx].clone()); } } - self.assignments - .insert(experiment_name.to_string(), assignment.clone()); + let _ = self + .assignments + .insert(experiment_name.to_owned(), assignment.clone()); assignment } - fn experiment_matches(&self, experiment: &ExperimentData, assignment: &Assignment) -> bool { + fn experiment_matches(experiment: &ExperimentData, assignment: &Assignment) -> bool { experiment.id == assignment.id && experiment.unit_type == assignment.unit_type && experiment.iteration == assignment.iteration @@ -571,7 +674,7 @@ impl Context { && assignment .traffic_split .as_ref() - .map_or(false, |ts| array_equals_shallow(&experiment.traffic_split, ts)) + .is_some_and(|ts| array_equals_shallow(&experiment.traffic_split, ts)) } fn audience_matches(&self, experiment: &ExperimentData, assignment: &Assignment) -> bool { @@ -579,7 +682,7 @@ impl Context { let attrs = self.get_attributes(); let result = self.audience_matcher.evaluate(&experiment.audience, &attrs); if let Some(matched) = result { - return matched == !assignment.audience_mismatch; + return matched != assignment.audience_mismatch; } } true @@ -589,7 +692,7 @@ impl Context { if let Some(assignment) = self.assignments.get(experiment_name) { let exposure = Exposure { id: assignment.id, - name: experiment_name.to_string(), + name: experiment_name.to_owned(), exposed_at: now_millis(), unit: assignment.unit_type.clone(), variant: assignment.variant, @@ -601,7 +704,10 @@ impl Context { audience_mismatch: assignment.audience_mismatch, }; - self.log_event("exposure", Some(serde_json::to_value(&exposure).unwrap_or_default())); + self.log_event( + "exposure", + Some(serde_json::to_value(&exposure).unwrap_or_default()), + ); self.exposures.push(exposure); self.pending += 1; } @@ -614,7 +720,7 @@ impl Context { if let Some(unit) = self.units.get(unit_type) { let hash = hash_unit(unit); - self.hashes.insert(unit_type.to_string(), hash.clone()); + let _ = self.hashes.insert(unit_type.to_owned(), hash.clone()); return Some(hash); } @@ -624,8 +730,8 @@ impl Context { fn build_publish_params(&self) -> PublishParams { let units: Vec = self .units - .iter() - .map(|(unit_type, _)| Unit { + .keys() + .map(|unit_type| Unit { unit_type: unit_type.clone(), uid: self.hashes.get(unit_type).cloned(), }) @@ -660,6 +766,7 @@ impl Context { } } +#[allow(clippy::cast_possible_truncation, clippy::cast_possible_wrap)] fn now_millis() -> i64 { SystemTime::now() .duration_since(UNIX_EPOCH) @@ -670,6 +777,7 @@ fn now_millis() -> i64 { #[cfg(test)] mod tests { use super::*; + use crate::models::Variant; use serde_json::json; fn make_experiment(name: &str, variants: Vec<&str>, split: Vec) -> ExperimentData { @@ -690,7 +798,11 @@ mod tests { variants: variants .iter() .map(|c| Variant { - config: if c.is_empty() { None } else { Some(c.to_string()) }, + config: if c.is_empty() { + None + } else { + Some((*c).to_string()) + }, }) .collect(), variables: HashMap::new(), @@ -774,7 +886,11 @@ mod tests { #[test] fn test_context_treatment_with_experiment() { - let exp = make_experiment("test_exp", vec!["{}", r#"{"button":"red"}"#], vec![0.5, 0.5]); + let exp = make_experiment( + "test_exp", + vec!["{}", r#"{"button":"red"}"#], + vec![0.5, 0.5], + ); let data = make_context_data(vec![exp]); let mut context = Context::new(data); @@ -785,7 +901,11 @@ mod tests { #[test] fn test_context_peek_does_not_queue_exposure() { - let exp = make_experiment("test_exp", vec!["{}", r#"{"button":"red"}"#], vec![0.5, 0.5]); + let exp = make_experiment( + "test_exp", + vec!["{}", r#"{"button":"red"}"#], + vec![0.5, 0.5], + ); let data = make_context_data(vec![exp]); let mut context = Context::new(data); @@ -796,7 +916,11 @@ mod tests { #[test] fn test_context_treatment_queues_exposure() { - let exp = make_experiment("test_exp", vec!["{}", r#"{"button":"red"}"#], vec![0.5, 0.5]); + let exp = make_experiment( + "test_exp", + vec!["{}", r#"{"button":"red"}"#], + vec![0.5, 0.5], + ); let data = make_context_data(vec![exp]); let mut context = Context::new(data); @@ -807,7 +931,11 @@ mod tests { #[test] fn test_context_treatment_only_queues_once() { - let exp = make_experiment("test_exp", vec!["{}", r#"{"button":"red"}"#], vec![0.5, 0.5]); + let exp = make_experiment( + "test_exp", + vec!["{}", r#"{"button":"red"}"#], + vec![0.5, 0.5], + ); let data = make_context_data(vec![exp]); let mut context = Context::new(data); @@ -820,7 +948,11 @@ mod tests { #[test] fn test_context_set_override() { - let exp = make_experiment("test_exp", vec!["{}", r#"{"button":"red"}"#], vec![0.5, 0.5]); + let exp = make_experiment( + "test_exp", + vec!["{}", r#"{"button":"red"}"#], + vec![0.5, 0.5], + ); let data = make_context_data(vec![exp]); let mut context = Context::new(data); @@ -832,7 +964,11 @@ mod tests { #[test] fn test_context_set_custom_assignment() { - let exp = make_experiment("test_exp", vec!["{}", r#"{"button":"red"}"#], vec![0.5, 0.5]); + let exp = make_experiment( + "test_exp", + vec!["{}", r#"{"button":"red"}"#], + vec![0.5, 0.5], + ); let data = make_context_data(vec![exp]); let mut context = Context::new(data); @@ -864,7 +1000,11 @@ mod tests { #[test] fn test_context_publish_clears_pending() { - let exp = make_experiment("test_exp", vec!["{}", r#"{"button":"red"}"#], vec![0.5, 0.5]); + let exp = make_experiment( + "test_exp", + vec!["{}", r#"{"button":"red"}"#], + vec![0.5, 0.5], + ); let data = make_context_data(vec![exp]); let mut context = Context::new(data); @@ -945,7 +1085,11 @@ mod tests { #[test] fn test_context_full_on_variant() { - let mut exp = make_experiment("test_exp", vec!["{}", r#"{"button":"red"}"#], vec![0.5, 0.5]); + let mut exp = make_experiment( + "test_exp", + vec!["{}", r#"{"button":"red"}"#], + vec![0.5, 0.5], + ); exp.full_on_variant = 1; let data = make_context_data(vec![exp]); let mut context = Context::new(data); @@ -956,7 +1100,11 @@ mod tests { #[test] fn test_context_audience_mismatch_strict() { - let mut exp = make_experiment("test_exp", vec!["{}", r#"{"button":"red"}"#], vec![0.0, 1.0]); + let mut exp = make_experiment( + "test_exp", + vec!["{}", r#"{"button":"red"}"#], + vec![0.0, 1.0], + ); exp.audience = r#"{"filter":[{"eq":[{"var":"country"},{"value":"US"}]}]}"#.to_string(); exp.audience_strict = true; let data = make_context_data(vec![exp]); @@ -970,7 +1118,11 @@ mod tests { #[test] fn test_context_audience_match() { - let mut exp = make_experiment("test_exp", vec!["{}", r#"{"button":"red"}"#], vec![0.0, 1.0]); + let mut exp = make_experiment( + "test_exp", + vec!["{}", r#"{"button":"red"}"#], + vec![0.0, 1.0], + ); exp.audience = r#"{"filter":[{"eq":[{"var":"country"},{"value":"US"}]}]}"#.to_string(); exp.audience_strict = true; let data = make_context_data(vec![exp]); @@ -1046,7 +1198,7 @@ mod tests { let data = make_context_data(vec![]); let mut context = Context::new(data); - let attrs = std::collections::HashMap::from([ + let attrs = HashMap::from([ ("country".to_string(), json!("UK")), ("tier".to_string(), json!("gold")), ]); @@ -1087,10 +1239,15 @@ mod tests { let data = make_context_data(vec![]); let mut context = Context::new(data); - assert!(context.track("purchase", json!({ - "item_count": 1, - "total_amount": 99.99 - })).is_ok()); + assert!(context + .track( + "purchase", + json!({ + "item_count": 1, + "total_amount": 99.99 + }) + ) + .is_ok()); assert_eq!(context.pending(), 1); } diff --git a/src/jsonexpr/evaluator.rs b/src/jsonexpr/evaluator.rs index 4fb822a..82d7b3d 100644 --- a/src/jsonexpr/evaluator.rs +++ b/src/jsonexpr/evaluator.rs @@ -1,46 +1,53 @@ +//! Core expression evaluator with type coercion and comparison logic. + use serde_json::Value; use std::collections::HashMap; use super::operators; +/// Evaluates JSON expressions against a set of variables. +#[derive(Debug)] pub struct Evaluator { vars: HashMap, } impl Evaluator { + /// Creates a new evaluator with the given variable bindings. pub fn new(vars: HashMap) -> Self { Self { vars } } + /// Evaluates a JSON expression, dispatching to the appropriate operator. pub fn evaluate(&self, expr: &Value) -> Value { match expr { Value::Array(arr) => operators::and_op(self, &Value::Array(arr.clone())), Value::Object(map) => { - for (key, value) in map.iter() { + if let Some((key, value)) = map.into_iter().next() { match key.as_str() { - "and" => return operators::and_op(self, value), - "or" => return operators::or_op(self, value), - "value" => return operators::value_op(self, value), - "var" => return operators::var_op(self, value), - "null" => return operators::null_op(self, value), - "not" => return operators::not_op(self, value), - "in" => return operators::in_op(self, value), - "match" => return operators::match_op(self, value), - "eq" => return operators::eq_op(self, value), - "gt" => return operators::gt_op(self, value), - "gte" => return operators::gte_op(self, value), - "lt" => return operators::lt_op(self, value), - "lte" => return operators::lte_op(self, value), - _ => {} + "and" => operators::and_op(self, value), + "or" => operators::or_op(self, value), + "value" => operators::value_op(self, value), + "var" => operators::var_op(self, value), + "null" => operators::null_op(self, value), + "not" => operators::not_op(self, value), + "in" => operators::in_op(self, value), + "match" => operators::match_op(self, value), + "eq" => operators::eq_op(self, value), + "gt" => operators::gt_op(self, value), + "gte" => operators::gte_op(self, value), + "lt" => operators::lt_op(self, value), + "lte" => operators::lte_op(self, value), + _ => Value::Null, } - break; + } else { + Value::Null } - Value::Null } _ => Value::Null, } } + /// Converts a JSON value to a boolean using ABsmartly's coercion rules. pub fn boolean_convert(&self, x: &Value) -> bool { match x { Value::Bool(b) => *b, @@ -55,11 +62,11 @@ impl Evaluator { } Value::String(s) => s != "false" && s != "0" && !s.is_empty(), Value::Null => false, - Value::Array(_) => true, - Value::Object(_) => true, + Value::Array(_) | Value::Object(_) => true, } } + /// Converts a JSON value to a number, returning `None` if conversion is not possible. pub fn number_convert(&self, x: &Value) -> Option { match x { Value::Number(n) => n.as_f64(), @@ -69,15 +76,16 @@ impl Evaluator { } } + /// Converts a JSON value to a string, returning `None` if conversion is not possible. pub fn string_convert(&self, x: &Value) -> Option { match x { Value::String(s) => Some(s.clone()), Value::Bool(b) => Some(b.to_string()), Value::Number(n) => { if let Some(f) = n.as_f64() { - let formatted = format!("{:.15}", f); + let formatted = format!("{f:.15}"); let trimmed = formatted.trim_end_matches('0').trim_end_matches('.'); - Some(trimmed.to_string()) + Some(trimmed.to_owned()) } else { None } @@ -86,6 +94,7 @@ impl Evaluator { } } + /// Extracts a variable value from the evaluator's variable map using a slash-separated path. pub fn extract_var(&self, path: &str) -> Value { let frags: Vec<&str> = path.split('/').collect(); let mut target: &Value = &Value::Object( @@ -122,6 +131,7 @@ impl Evaluator { target.clone() } + /// Compares two JSON values, returning -1, 0, or 1 for ordering, or `None` if incomparable. pub fn compare(&self, lhs: &Value, rhs: &Value) -> Option { if lhs.is_null() { return if rhs.is_null() { Some(0) } else { None }; @@ -170,12 +180,13 @@ impl Evaluator { } } +/// Performs a deep equality comparison of two JSON values. pub fn values_equal_deep(a: &Value, b: &Value) -> bool { match (a, b) { (Value::Null, Value::Null) => true, (Value::Bool(ab), Value::Bool(bb)) => ab == bb, (Value::Number(an), Value::Number(bn)) => { - an.as_f64().zip(bn.as_f64()).map_or(false, |(a, b)| { + an.as_f64().zip(bn.as_f64()).is_some_and(|(a, b)| { if a.is_nan() && b.is_nan() { true } else { @@ -183,13 +194,19 @@ pub fn values_equal_deep(a: &Value, b: &Value) -> bool { } }) } - (Value::String(as_), Value::String(bs)) => as_ == bs, + (Value::String(a_str), Value::String(b_str)) => a_str == b_str, (Value::Array(aa), Value::Array(ba)) => { - aa.len() == ba.len() && aa.iter().zip(ba.iter()).all(|(x, y)| values_equal_deep(x, y)) + aa.len() == ba.len() + && aa + .iter() + .zip(ba.iter()) + .all(|(x, y)| values_equal_deep(x, y)) } (Value::Object(ao), Value::Object(bo)) => { ao.len() == bo.len() - && ao.iter().all(|(k, v)| bo.get(k).map_or(false, |bv| values_equal_deep(v, bv))) + && ao + .iter() + .all(|(k, v)| bo.get(k).is_some_and(|bv| values_equal_deep(v, bv))) } _ => false, } @@ -265,8 +282,14 @@ mod tests { assert_eq!(evaluator.number_convert(&json!(1.5)), Some(1.5)); assert_eq!(evaluator.number_convert(&json!(2.0)), Some(2.0)); assert_eq!(evaluator.number_convert(&json!(3.0)), Some(3.0)); - assert_eq!(evaluator.number_convert(&json!(2147483647)), Some(2147483647.0)); - assert_eq!(evaluator.number_convert(&json!(-2147483647)), Some(-2147483647.0)); + assert_eq!( + evaluator.number_convert(&json!(2_147_483_647)), + Some(2_147_483_647.0) + ); + assert_eq!( + evaluator.number_convert(&json!(-2_147_483_647)), + Some(-2_147_483_647.0) + ); } #[test] @@ -291,27 +314,45 @@ mod tests { #[test] fn test_string_convert_booleans() { let evaluator = make_evaluator(); - assert_eq!(evaluator.string_convert(&json!(true)), Some("true".to_string())); - assert_eq!(evaluator.string_convert(&json!(false)), Some("false".to_string())); + assert_eq!( + evaluator.string_convert(&json!(true)), + Some("true".to_string()) + ); + assert_eq!( + evaluator.string_convert(&json!(false)), + Some("false".to_string()) + ); } #[test] fn test_string_convert_strings() { let evaluator = make_evaluator(); - assert_eq!(evaluator.string_convert(&json!("")), Some("".to_string())); - assert_eq!(evaluator.string_convert(&json!("abc")), Some("abc".to_string())); + assert_eq!(evaluator.string_convert(&json!("")), Some(String::new())); + assert_eq!( + evaluator.string_convert(&json!("abc")), + Some("abc".to_string()) + ); } #[test] fn test_string_convert_numbers() { let evaluator = make_evaluator(); - assert_eq!(evaluator.string_convert(&json!(-1.0)), Some("-1".to_string())); + assert_eq!( + evaluator.string_convert(&json!(-1.0)), + Some("-1".to_string()) + ); assert_eq!(evaluator.string_convert(&json!(0.0)), Some("0".to_string())); assert_eq!(evaluator.string_convert(&json!(1.0)), Some("1".to_string())); assert_eq!(evaluator.string_convert(&json!(2.0)), Some("2".to_string())); assert_eq!(evaluator.string_convert(&json!(3.0)), Some("3".to_string())); - assert_eq!(evaluator.string_convert(&json!(2147483647.0)), Some("2147483647".to_string())); - assert_eq!(evaluator.string_convert(&json!(-2147483647.0)), Some("-2147483647".to_string())); + assert_eq!( + evaluator.string_convert(&json!(2_147_483_647.0)), + Some("2147483647".to_string()) + ); + assert_eq!( + evaluator.string_convert(&json!(-2_147_483_647.0)), + Some("-2147483647".to_string()) + ); } #[test] @@ -395,7 +436,10 @@ mod tests { fn test_compare_objects() { let evaluator = make_evaluator(); assert_eq!(evaluator.compare(&json!({}), &json!({})), Some(0)); - assert_eq!(evaluator.compare(&json!({"a": 1}), &json!({"a": 1})), Some(0)); + assert_eq!( + evaluator.compare(&json!({"a": 1}), &json!({"a": 1})), + Some(0) + ); assert_eq!(evaluator.compare(&json!({"a": 1}), &json!({"b": 2})), None); assert_eq!(evaluator.compare(&json!({}), &json!([])), None); } @@ -501,8 +545,14 @@ mod tests { #[test] fn test_values_equal_deep_objects() { - assert!(values_equal_deep(&json!({"a": 1, "b": 2}), &json!({"a": 1, "b": 2}))); - assert!(values_equal_deep(&json!({"a": 1, "b": 2}), &json!({"b": 2, "a": 1}))); + assert!(values_equal_deep( + &json!({"a": 1, "b": 2}), + &json!({"a": 1, "b": 2}) + )); + assert!(values_equal_deep( + &json!({"a": 1, "b": 2}), + &json!({"b": 2, "a": 1}) + )); assert!(!values_equal_deep(&json!({"a": 1}), &json!({"b": 2}))); assert!(!values_equal_deep(&json!({}), &json!({"a": 1}))); assert!(!values_equal_deep(&json!({"a": 1}), &json!({}))); diff --git a/src/jsonexpr/mod.rs b/src/jsonexpr/mod.rs index e7948da..4953c60 100644 --- a/src/jsonexpr/mod.rs +++ b/src/jsonexpr/mod.rs @@ -1,3 +1,5 @@ +//! JSON expression evaluator for audience filter matching. + pub mod evaluator; pub mod operators; @@ -5,19 +7,28 @@ use evaluator::Evaluator; use serde_json::Value; use std::collections::HashMap; +/// Entry point for evaluating JSON-based filter expressions. +#[derive(Debug)] pub struct JsonExpr; impl JsonExpr { + /// Creates a new JSON expression evaluator. pub fn new() -> Self { Self } - pub fn evaluate_boolean_expr(&self, expr: &Value, vars: &HashMap) -> Option { + /// Evaluates a JSON expression as a boolean in the context of the given variables. + pub fn evaluate_boolean_expr( + &self, + expr: &Value, + vars: &HashMap, + ) -> Option { let evaluator = Evaluator::new(vars.clone()); let result = evaluator.evaluate(expr); Some(evaluator.boolean_convert(&result)) } + /// Evaluates a JSON expression and returns the resulting value. pub fn evaluate_expr(&self, expr: &Value, vars: &HashMap) -> Value { let evaluator = Evaluator::new(vars.clone()); evaluator.evaluate(expr) diff --git a/src/jsonexpr/operators/mod.rs b/src/jsonexpr/operators/mod.rs index e38a67f..6bde250 100644 --- a/src/jsonexpr/operators/mod.rs +++ b/src/jsonexpr/operators/mod.rs @@ -1,8 +1,11 @@ +//! JSON expression operator implementations. + use regex::Regex; use serde_json::Value; use super::evaluator::{values_equal_deep, Evaluator}; +/// Logical AND: returns true if all sub-expressions are truthy. pub fn and_op(evaluator: &Evaluator, args: &Value) -> Value { if let Value::Array(exprs) = args { for expr in exprs { @@ -17,6 +20,7 @@ pub fn and_op(evaluator: &Evaluator, args: &Value) -> Value { } } +/// Logical OR: returns true if any sub-expression is truthy. pub fn or_op(evaluator: &Evaluator, args: &Value) -> Value { if let Value::Array(exprs) = args { for expr in exprs { @@ -31,10 +35,12 @@ pub fn or_op(evaluator: &Evaluator, args: &Value) -> Value { } } +/// Returns the argument value as-is. pub fn value_op(_evaluator: &Evaluator, args: &Value) -> Value { args.clone() } +/// Resolves a variable reference by path. pub fn var_op(evaluator: &Evaluator, args: &Value) -> Value { if let Value::String(path) = args { evaluator.extract_var(path) @@ -43,16 +49,19 @@ pub fn var_op(evaluator: &Evaluator, args: &Value) -> Value { } } +/// Returns true if the evaluated argument is null. pub fn null_op(evaluator: &Evaluator, args: &Value) -> Value { let result = evaluator.evaluate(args); Value::Bool(result.is_null()) } +/// Logical NOT: returns the boolean negation of the evaluated argument. pub fn not_op(evaluator: &Evaluator, args: &Value) -> Value { let result = evaluator.evaluate(args); Value::Bool(!evaluator.boolean_convert(&result)) } +/// Membership test: checks if a value is contained in a string, array, or object. pub fn in_op(evaluator: &Evaluator, args: &Value) -> Value { if let Value::Array(arr) = args { if arr.len() != 2 { @@ -67,7 +76,7 @@ pub fn in_op(evaluator: &Evaluator, args: &Value) -> Value { (_, Value::Array(h_arr)) => { Value::Bool(h_arr.iter().any(|item| values_equal_deep(&needle, item))) } - (Value::String(n), Value::Object(h_map)) => Value::Bool(h_map.contains_key(n)), + (Value::String(n), Value::Object(h_map)) => Value::Bool(h_map.contains_key(n.as_str())), _ => Value::Bool(false), } } else { @@ -75,6 +84,7 @@ pub fn in_op(evaluator: &Evaluator, args: &Value) -> Value { } } +/// Regex match: checks if a string matches a regular expression pattern. pub fn match_op(evaluator: &Evaluator, args: &Value) -> Value { if let Value::Array(arr) = args { if arr.len() != 2 { @@ -98,71 +108,32 @@ pub fn match_op(evaluator: &Evaluator, args: &Value) -> Value { } } +/// Equality comparison. pub fn eq_op(evaluator: &Evaluator, args: &Value) -> Value { - if let Value::Array(arr) = args { - if arr.len() != 2 { - return Value::Bool(false); - } - - let lhs = evaluator.evaluate(&arr[0]); - let rhs = evaluator.evaluate(&arr[1]); - let result = evaluator.compare(&lhs, &rhs); - - Value::Bool(result == Some(0)) - } else { - Value::Bool(false) - } + compare_op(evaluator, args, |r| r == 0) } +/// Greater-than comparison. pub fn gt_op(evaluator: &Evaluator, args: &Value) -> Value { - if let Value::Array(arr) = args { - if arr.len() != 2 { - return Value::Bool(false); - } - - let lhs = evaluator.evaluate(&arr[0]); - let rhs = evaluator.evaluate(&arr[1]); - let result = evaluator.compare(&lhs, &rhs); - - Value::Bool(result.map_or(false, |r| r > 0)) - } else { - Value::Bool(false) - } + compare_op(evaluator, args, |r| r > 0) } +/// Greater-than-or-equal comparison. pub fn gte_op(evaluator: &Evaluator, args: &Value) -> Value { - if let Value::Array(arr) = args { - if arr.len() != 2 { - return Value::Bool(false); - } - - let lhs = evaluator.evaluate(&arr[0]); - let rhs = evaluator.evaluate(&arr[1]); - let result = evaluator.compare(&lhs, &rhs); - - Value::Bool(result.map_or(false, |r| r >= 0)) - } else { - Value::Bool(false) - } + compare_op(evaluator, args, |r| r >= 0) } +/// Less-than comparison. pub fn lt_op(evaluator: &Evaluator, args: &Value) -> Value { - if let Value::Array(arr) = args { - if arr.len() != 2 { - return Value::Bool(false); - } - - let lhs = evaluator.evaluate(&arr[0]); - let rhs = evaluator.evaluate(&arr[1]); - let result = evaluator.compare(&lhs, &rhs); - - Value::Bool(result.map_or(false, |r| r < 0)) - } else { - Value::Bool(false) - } + compare_op(evaluator, args, |r| r < 0) } +/// Less-than-or-equal comparison. pub fn lte_op(evaluator: &Evaluator, args: &Value) -> Value { + compare_op(evaluator, args, |r| r <= 0) +} + +fn compare_op(evaluator: &Evaluator, args: &Value, predicate: fn(i32) -> bool) -> Value { if let Value::Array(arr) = args { if arr.len() != 2 { return Value::Bool(false); @@ -172,7 +143,7 @@ pub fn lte_op(evaluator: &Evaluator, args: &Value) -> Value { let rhs = evaluator.evaluate(&arr[1]); let result = evaluator.compare(&lhs, &rhs); - Value::Bool(result.map_or(false, |r| r <= 0)) + Value::Bool(result.is_some_and(predicate)) } else { Value::Bool(false) } @@ -197,17 +168,35 @@ mod tests { fn test_and_all_true() { let evaluator = make_evaluator(); assert_eq!(and_op(&evaluator, &json!([{"value": true}])), json!(true)); - assert_eq!(and_op(&evaluator, &json!([{"value": true}, {"value": true}])), json!(true)); - assert_eq!(and_op(&evaluator, &json!([{"value": true}, {"value": true}, {"value": true}])), json!(true)); + assert_eq!( + and_op(&evaluator, &json!([{"value": true}, {"value": true}])), + json!(true) + ); + assert_eq!( + and_op( + &evaluator, + &json!([{"value": true}, {"value": true}, {"value": true}]) + ), + json!(true) + ); } #[test] fn test_and_any_false() { let evaluator = make_evaluator(); assert_eq!(and_op(&evaluator, &json!([{"value": false}])), json!(false)); - assert_eq!(and_op(&evaluator, &json!([{"value": true}, {"value": false}])), json!(false)); - assert_eq!(and_op(&evaluator, &json!([{"value": false}, {"value": true}])), json!(false)); - assert_eq!(and_op(&evaluator, &json!([{"value": false}, {"value": false}])), json!(false)); + assert_eq!( + and_op(&evaluator, &json!([{"value": true}, {"value": false}])), + json!(false) + ); + assert_eq!( + and_op(&evaluator, &json!([{"value": false}, {"value": true}])), + json!(false) + ); + assert_eq!( + and_op(&evaluator, &json!([{"value": false}, {"value": false}])), + json!(false) + ); } #[test] @@ -220,17 +209,35 @@ mod tests { fn test_or_any_true() { let evaluator = make_evaluator(); assert_eq!(or_op(&evaluator, &json!([{"value": true}])), json!(true)); - assert_eq!(or_op(&evaluator, &json!([{"value": true}, {"value": true}])), json!(true)); - assert_eq!(or_op(&evaluator, &json!([{"value": true}, {"value": false}])), json!(true)); - assert_eq!(or_op(&evaluator, &json!([{"value": false}, {"value": true}])), json!(true)); + assert_eq!( + or_op(&evaluator, &json!([{"value": true}, {"value": true}])), + json!(true) + ); + assert_eq!( + or_op(&evaluator, &json!([{"value": true}, {"value": false}])), + json!(true) + ); + assert_eq!( + or_op(&evaluator, &json!([{"value": false}, {"value": true}])), + json!(true) + ); } #[test] fn test_or_all_false() { let evaluator = make_evaluator(); assert_eq!(or_op(&evaluator, &json!([{"value": false}])), json!(false)); - assert_eq!(or_op(&evaluator, &json!([{"value": false}, {"value": false}])), json!(false)); - assert_eq!(or_op(&evaluator, &json!([{"value": false}, {"value": false}, {"value": false}])), json!(false)); + assert_eq!( + or_op(&evaluator, &json!([{"value": false}, {"value": false}])), + json!(false) + ); + assert_eq!( + or_op( + &evaluator, + &json!([{"value": false}, {"value": false}, {"value": false}]) + ), + json!(false) + ); } #[test] @@ -275,137 +282,368 @@ mod tests { assert_eq!(not_op(&evaluator, &json!({"value": 1})), json!(false)); assert_eq!(not_op(&evaluator, &json!({"value": 0})), json!(true)); assert_eq!(not_op(&evaluator, &json!({"value": null})), json!(true)); - assert_eq!(not_op(&evaluator, &json!({"var": "returning"})), json!(false)); + assert_eq!( + not_op(&evaluator, &json!({"var": "returning"})), + json!(false) + ); } #[test] fn test_eq_op_numbers() { let evaluator = make_evaluator(); - assert_eq!(eq_op(&evaluator, &json!([{"value": 0}, {"value": 0}])), json!(true)); - assert_eq!(eq_op(&evaluator, &json!([{"value": 1}, {"value": 1}])), json!(true)); - assert_eq!(eq_op(&evaluator, &json!([{"value": 0}, {"value": 1}])), json!(false)); - assert_eq!(eq_op(&evaluator, &json!([{"var": "age"}, {"value": 25}])), json!(true)); - assert_eq!(eq_op(&evaluator, &json!([{"var": "age"}, {"value": 30}])), json!(false)); + assert_eq!( + eq_op(&evaluator, &json!([{"value": 0}, {"value": 0}])), + json!(true) + ); + assert_eq!( + eq_op(&evaluator, &json!([{"value": 1}, {"value": 1}])), + json!(true) + ); + assert_eq!( + eq_op(&evaluator, &json!([{"value": 0}, {"value": 1}])), + json!(false) + ); + assert_eq!( + eq_op(&evaluator, &json!([{"var": "age"}, {"value": 25}])), + json!(true) + ); + assert_eq!( + eq_op(&evaluator, &json!([{"var": "age"}, {"value": 30}])), + json!(false) + ); } #[test] fn test_eq_op_strings() { let evaluator = make_evaluator(); - assert_eq!(eq_op(&evaluator, &json!([{"value": ""}, {"value": ""}])), json!(true)); - assert_eq!(eq_op(&evaluator, &json!([{"value": "abc"}, {"value": "abc"}])), json!(true)); - assert_eq!(eq_op(&evaluator, &json!([{"value": "abc"}, {"value": "def"}])), json!(false)); - assert_eq!(eq_op(&evaluator, &json!([{"var": "name"}, {"value": "John"}])), json!(true)); + assert_eq!( + eq_op(&evaluator, &json!([{"value": ""}, {"value": ""}])), + json!(true) + ); + assert_eq!( + eq_op(&evaluator, &json!([{"value": "abc"}, {"value": "abc"}])), + json!(true) + ); + assert_eq!( + eq_op(&evaluator, &json!([{"value": "abc"}, {"value": "def"}])), + json!(false) + ); + assert_eq!( + eq_op(&evaluator, &json!([{"var": "name"}, {"value": "John"}])), + json!(true) + ); } #[test] fn test_eq_op_booleans() { let evaluator = make_evaluator(); - assert_eq!(eq_op(&evaluator, &json!([{"value": true}, {"value": true}])), json!(true)); - assert_eq!(eq_op(&evaluator, &json!([{"value": false}, {"value": false}])), json!(true)); - assert_eq!(eq_op(&evaluator, &json!([{"value": true}, {"value": false}])), json!(false)); + assert_eq!( + eq_op(&evaluator, &json!([{"value": true}, {"value": true}])), + json!(true) + ); + assert_eq!( + eq_op(&evaluator, &json!([{"value": false}, {"value": false}])), + json!(true) + ); + assert_eq!( + eq_op(&evaluator, &json!([{"value": true}, {"value": false}])), + json!(false) + ); } #[test] fn test_eq_op_null() { let evaluator = make_evaluator(); - assert_eq!(eq_op(&evaluator, &json!([{"value": null}, {"value": null}])), json!(true)); - assert_eq!(eq_op(&evaluator, &json!([{"value": null}, {"value": 0}])), json!(false)); + assert_eq!( + eq_op(&evaluator, &json!([{"value": null}, {"value": null}])), + json!(true) + ); + assert_eq!( + eq_op(&evaluator, &json!([{"value": null}, {"value": 0}])), + json!(false) + ); } #[test] fn test_gt_op() { let evaluator = make_evaluator(); - assert_eq!(gt_op(&evaluator, &json!([{"value": 1}, {"value": 0}])), json!(true)); - assert_eq!(gt_op(&evaluator, &json!([{"value": 0}, {"value": 1}])), json!(false)); - assert_eq!(gt_op(&evaluator, &json!([{"value": 1}, {"value": 1}])), json!(false)); - assert_eq!(gt_op(&evaluator, &json!([{"var": "age"}, {"value": 20}])), json!(true)); - assert_eq!(gt_op(&evaluator, &json!([{"var": "age"}, {"value": 25}])), json!(false)); - assert_eq!(gt_op(&evaluator, &json!([{"var": "age"}, {"value": 30}])), json!(false)); + assert_eq!( + gt_op(&evaluator, &json!([{"value": 1}, {"value": 0}])), + json!(true) + ); + assert_eq!( + gt_op(&evaluator, &json!([{"value": 0}, {"value": 1}])), + json!(false) + ); + assert_eq!( + gt_op(&evaluator, &json!([{"value": 1}, {"value": 1}])), + json!(false) + ); + assert_eq!( + gt_op(&evaluator, &json!([{"var": "age"}, {"value": 20}])), + json!(true) + ); + assert_eq!( + gt_op(&evaluator, &json!([{"var": "age"}, {"value": 25}])), + json!(false) + ); + assert_eq!( + gt_op(&evaluator, &json!([{"var": "age"}, {"value": 30}])), + json!(false) + ); } #[test] fn test_gt_op_strings() { let evaluator = make_evaluator(); - assert_eq!(gt_op(&evaluator, &json!([{"value": "b"}, {"value": "a"}])), json!(true)); - assert_eq!(gt_op(&evaluator, &json!([{"value": "a"}, {"value": "b"}])), json!(false)); - assert_eq!(gt_op(&evaluator, &json!([{"value": "a"}, {"value": "a"}])), json!(false)); + assert_eq!( + gt_op(&evaluator, &json!([{"value": "b"}, {"value": "a"}])), + json!(true) + ); + assert_eq!( + gt_op(&evaluator, &json!([{"value": "a"}, {"value": "b"}])), + json!(false) + ); + assert_eq!( + gt_op(&evaluator, &json!([{"value": "a"}, {"value": "a"}])), + json!(false) + ); } #[test] fn test_gte_op() { let evaluator = make_evaluator(); - assert_eq!(gte_op(&evaluator, &json!([{"value": 1}, {"value": 0}])), json!(true)); - assert_eq!(gte_op(&evaluator, &json!([{"value": 1}, {"value": 1}])), json!(true)); - assert_eq!(gte_op(&evaluator, &json!([{"value": 0}, {"value": 1}])), json!(false)); - assert_eq!(gte_op(&evaluator, &json!([{"var": "age"}, {"value": 20}])), json!(true)); - assert_eq!(gte_op(&evaluator, &json!([{"var": "age"}, {"value": 25}])), json!(true)); - assert_eq!(gte_op(&evaluator, &json!([{"var": "age"}, {"value": 30}])), json!(false)); + assert_eq!( + gte_op(&evaluator, &json!([{"value": 1}, {"value": 0}])), + json!(true) + ); + assert_eq!( + gte_op(&evaluator, &json!([{"value": 1}, {"value": 1}])), + json!(true) + ); + assert_eq!( + gte_op(&evaluator, &json!([{"value": 0}, {"value": 1}])), + json!(false) + ); + assert_eq!( + gte_op(&evaluator, &json!([{"var": "age"}, {"value": 20}])), + json!(true) + ); + assert_eq!( + gte_op(&evaluator, &json!([{"var": "age"}, {"value": 25}])), + json!(true) + ); + assert_eq!( + gte_op(&evaluator, &json!([{"var": "age"}, {"value": 30}])), + json!(false) + ); } #[test] fn test_lt_op() { let evaluator = make_evaluator(); - assert_eq!(lt_op(&evaluator, &json!([{"value": 0}, {"value": 1}])), json!(true)); - assert_eq!(lt_op(&evaluator, &json!([{"value": 1}, {"value": 0}])), json!(false)); - assert_eq!(lt_op(&evaluator, &json!([{"value": 1}, {"value": 1}])), json!(false)); - assert_eq!(lt_op(&evaluator, &json!([{"var": "age"}, {"value": 30}])), json!(true)); - assert_eq!(lt_op(&evaluator, &json!([{"var": "age"}, {"value": 25}])), json!(false)); - assert_eq!(lt_op(&evaluator, &json!([{"var": "age"}, {"value": 20}])), json!(false)); + assert_eq!( + lt_op(&evaluator, &json!([{"value": 0}, {"value": 1}])), + json!(true) + ); + assert_eq!( + lt_op(&evaluator, &json!([{"value": 1}, {"value": 0}])), + json!(false) + ); + assert_eq!( + lt_op(&evaluator, &json!([{"value": 1}, {"value": 1}])), + json!(false) + ); + assert_eq!( + lt_op(&evaluator, &json!([{"var": "age"}, {"value": 30}])), + json!(true) + ); + assert_eq!( + lt_op(&evaluator, &json!([{"var": "age"}, {"value": 25}])), + json!(false) + ); + assert_eq!( + lt_op(&evaluator, &json!([{"var": "age"}, {"value": 20}])), + json!(false) + ); } #[test] fn test_lte_op() { let evaluator = make_evaluator(); - assert_eq!(lte_op(&evaluator, &json!([{"value": 0}, {"value": 1}])), json!(true)); - assert_eq!(lte_op(&evaluator, &json!([{"value": 1}, {"value": 1}])), json!(true)); - assert_eq!(lte_op(&evaluator, &json!([{"value": 1}, {"value": 0}])), json!(false)); - assert_eq!(lte_op(&evaluator, &json!([{"var": "age"}, {"value": 30}])), json!(true)); - assert_eq!(lte_op(&evaluator, &json!([{"var": "age"}, {"value": 25}])), json!(true)); - assert_eq!(lte_op(&evaluator, &json!([{"var": "age"}, {"value": 20}])), json!(false)); + assert_eq!( + lte_op(&evaluator, &json!([{"value": 0}, {"value": 1}])), + json!(true) + ); + assert_eq!( + lte_op(&evaluator, &json!([{"value": 1}, {"value": 1}])), + json!(true) + ); + assert_eq!( + lte_op(&evaluator, &json!([{"value": 1}, {"value": 0}])), + json!(false) + ); + assert_eq!( + lte_op(&evaluator, &json!([{"var": "age"}, {"value": 30}])), + json!(true) + ); + assert_eq!( + lte_op(&evaluator, &json!([{"var": "age"}, {"value": 25}])), + json!(true) + ); + assert_eq!( + lte_op(&evaluator, &json!([{"var": "age"}, {"value": 20}])), + json!(false) + ); } #[test] fn test_in_op_string_contains() { let evaluator = make_evaluator(); - assert_eq!(in_op(&evaluator, &json!([{"value": "abc"}, {"value": "abcdefghijk"}])), json!(true)); - assert_eq!(in_op(&evaluator, &json!([{"value": "def"}, {"value": "abcdefghijk"}])), json!(true)); - assert_eq!(in_op(&evaluator, &json!([{"value": "xyz"}, {"value": "abcdefghijk"}])), json!(false)); + assert_eq!( + in_op( + &evaluator, + &json!([{"value": "abc"}, {"value": "abcdefghijk"}]) + ), + json!(true) + ); + assert_eq!( + in_op( + &evaluator, + &json!([{"value": "def"}, {"value": "abcdefghijk"}]) + ), + json!(true) + ); + assert_eq!( + in_op( + &evaluator, + &json!([{"value": "xyz"}, {"value": "abcdefghijk"}]) + ), + json!(false) + ); } #[test] fn test_in_op_array_contains() { let evaluator = make_evaluator(); - assert_eq!(in_op(&evaluator, &json!([{"value": 1}, {"value": [1, 2, 3]}])), json!(true)); - assert_eq!(in_op(&evaluator, &json!([{"value": 2}, {"value": [1, 2, 3]}])), json!(true)); - assert_eq!(in_op(&evaluator, &json!([{"value": 4}, {"value": [1, 2, 3]}])), json!(false)); - assert_eq!(in_op(&evaluator, &json!([{"value": 1}, {"value": []}])), json!(false)); + assert_eq!( + in_op(&evaluator, &json!([{"value": 1}, {"value": [1, 2, 3]}])), + json!(true) + ); + assert_eq!( + in_op(&evaluator, &json!([{"value": 2}, {"value": [1, 2, 3]}])), + json!(true) + ); + assert_eq!( + in_op(&evaluator, &json!([{"value": 4}, {"value": [1, 2, 3]}])), + json!(false) + ); + assert_eq!( + in_op(&evaluator, &json!([{"value": 1}, {"value": []}])), + json!(false) + ); } #[test] fn test_in_op_object_contains_key() { let evaluator = make_evaluator(); - assert_eq!(in_op(&evaluator, &json!([{"value": "a"}, {"value": {"a": 1, "b": 2}}])), json!(true)); - assert_eq!(in_op(&evaluator, &json!([{"value": "b"}, {"value": {"a": 1, "b": 2}}])), json!(true)); - assert_eq!(in_op(&evaluator, &json!([{"value": "c"}, {"value": {"a": 1, "b": 2}}])), json!(false)); + assert_eq!( + in_op( + &evaluator, + &json!([{"value": "a"}, {"value": {"a": 1, "b": 2}}]) + ), + json!(true) + ); + assert_eq!( + in_op( + &evaluator, + &json!([{"value": "b"}, {"value": {"a": 1, "b": 2}}]) + ), + json!(true) + ); + assert_eq!( + in_op( + &evaluator, + &json!([{"value": "c"}, {"value": {"a": 1, "b": 2}}]) + ), + json!(false) + ); } #[test] fn test_match_op() { let evaluator = make_evaluator(); - assert_eq!(match_op(&evaluator, &json!([{"value": "abcdefghijk"}, {"value": ""}])), json!(true)); - assert_eq!(match_op(&evaluator, &json!([{"value": "abcdefghijk"}, {"value": "abc"}])), json!(true)); - assert_eq!(match_op(&evaluator, &json!([{"value": "abcdefghijk"}, {"value": "ijk"}])), json!(true)); - assert_eq!(match_op(&evaluator, &json!([{"value": "abcdefghijk"}, {"value": "^abc"}])), json!(true)); - assert_eq!(match_op(&evaluator, &json!([{"value": "abcdefghijk"}, {"value": "ijk$"}])), json!(true)); - assert_eq!(match_op(&evaluator, &json!([{"value": "abcdefghijk"}, {"value": "def"}])), json!(true)); - assert_eq!(match_op(&evaluator, &json!([{"value": "abcdefghijk"}, {"value": "b.*j"}])), json!(true)); - assert_eq!(match_op(&evaluator, &json!([{"value": "abcdefghijk"}, {"value": "xyz"}])), json!(false)); + assert_eq!( + match_op( + &evaluator, + &json!([{"value": "abcdefghijk"}, {"value": ""}]) + ), + json!(true) + ); + assert_eq!( + match_op( + &evaluator, + &json!([{"value": "abcdefghijk"}, {"value": "abc"}]) + ), + json!(true) + ); + assert_eq!( + match_op( + &evaluator, + &json!([{"value": "abcdefghijk"}, {"value": "ijk"}]) + ), + json!(true) + ); + assert_eq!( + match_op( + &evaluator, + &json!([{"value": "abcdefghijk"}, {"value": "^abc"}]) + ), + json!(true) + ); + assert_eq!( + match_op( + &evaluator, + &json!([{"value": "abcdefghijk"}, {"value": "ijk$"}]) + ), + json!(true) + ); + assert_eq!( + match_op( + &evaluator, + &json!([{"value": "abcdefghijk"}, {"value": "def"}]) + ), + json!(true) + ); + assert_eq!( + match_op( + &evaluator, + &json!([{"value": "abcdefghijk"}, {"value": "b.*j"}]) + ), + json!(true) + ); + assert_eq!( + match_op( + &evaluator, + &json!([{"value": "abcdefghijk"}, {"value": "xyz"}]) + ), + json!(false) + ); } #[test] fn test_match_op_with_null() { let evaluator = make_evaluator(); - assert_eq!(match_op(&evaluator, &json!([{"value": null}, {"value": "abc"}])), json!(false)); - assert_eq!(match_op(&evaluator, &json!([{"value": "abcdefghijk"}, {"value": null}])), json!(false)); + assert_eq!( + match_op(&evaluator, &json!([{"value": null}, {"value": "abc"}])), + json!(false) + ); + assert_eq!( + match_op( + &evaluator, + &json!([{"value": "abcdefghijk"}, {"value": null}]) + ), + json!(false) + ); } } diff --git a/src/lib.rs b/src/lib.rs index e20815d..58bd0ee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,13 +1,32 @@ -pub mod murmur3; -pub mod md5; -pub mod utils; +//! ABsmartly SDK for Rust - A/B testing and feature flagging. +//! +//! This crate provides a Rust client for the ABsmartly platform, enabling +//! A/B testing, feature flagging, and experimentation in Rust applications. + +#![cfg_attr( + test, + allow( + clippy::unwrap_used, + clippy::str_to_string, + clippy::needless_pass_by_value, + clippy::unreadable_literal, + unused_results, + ) +)] + pub mod assigner; +pub mod context; pub mod jsonexpr; pub mod matcher; +pub mod md5; pub mod models; -pub mod context; +pub mod murmur3; pub mod sdk; +pub mod utils; -pub use sdk::{SDK, SDKConfig, SDKError}; pub use context::Context; -pub use models::*; +pub use models::{ + Assignment, Attribute, ContextData, ContextOptions, ContextParams, ContextState, + CustomFieldValue, ExperimentData, Exposure, Goal, PublishParams, Unit, Variant, +}; +pub use sdk::{SDKConfig, SDKError, SDK}; diff --git a/src/matcher.rs b/src/matcher.rs index 2aa268c..7d5b2c4 100644 --- a/src/matcher.rs +++ b/src/matcher.rs @@ -1,19 +1,28 @@ +//! Audience matching using JSON-based filter expressions. + use serde_json::Value; use std::collections::HashMap; use crate::jsonexpr::JsonExpr; +/// Evaluates audience filter expressions against a set of attribute variables. +#[derive(Debug)] pub struct AudienceMatcher { json_expr: JsonExpr, } impl AudienceMatcher { + /// Creates a new audience matcher. pub fn new() -> Self { Self { json_expr: JsonExpr::new(), } } + /// Evaluates an audience JSON string against the provided variables. + /// + /// Returns `Some(true)` if the audience matches, `Some(false)` if it doesn't, + /// or `None` if the audience string is invalid or has no filter. pub fn evaluate(&self, audience_string: &str, vars: &HashMap) -> Option { match serde_json::from_str::(audience_string) { Ok(audience) => { @@ -66,11 +75,26 @@ mod tests { let matcher = AudienceMatcher::new(); let vars = HashMap::new(); - assert_eq!(matcher.evaluate(r#"{"filter":[{"value":5}]}"#, &vars), Some(true)); - assert_eq!(matcher.evaluate(r#"{"filter":[{"value":true}]}"#, &vars), Some(true)); - assert_eq!(matcher.evaluate(r#"{"filter":[{"value":1}]}"#, &vars), Some(true)); - assert_eq!(matcher.evaluate(r#"{"filter":[{"value":null}]}"#, &vars), Some(false)); - assert_eq!(matcher.evaluate(r#"{"filter":[{"value":0}]}"#, &vars), Some(false)); + assert_eq!( + matcher.evaluate(r#"{"filter":[{"value":5}]}"#, &vars), + Some(true) + ); + assert_eq!( + matcher.evaluate(r#"{"filter":[{"value":true}]}"#, &vars), + Some(true) + ); + assert_eq!( + matcher.evaluate(r#"{"filter":[{"value":1}]}"#, &vars), + Some(true) + ); + assert_eq!( + matcher.evaluate(r#"{"filter":[{"value":null}]}"#, &vars), + Some(false) + ); + assert_eq!( + matcher.evaluate(r#"{"filter":[{"value":0}]}"#, &vars), + Some(false) + ); } #[test] diff --git a/src/md5.rs b/src/md5.rs index 0501152..e4d0cf9 100644 --- a/src/md5.rs +++ b/src/md5.rs @@ -1,5 +1,8 @@ +//! MD5 hashing utility used internally for unit hashing. + use md5::{Digest, Md5}; +/// Computes the MD5 digest of the given byte slice, returning a 16-byte array. pub fn md5(data: &[u8]) -> [u8; 16] { let mut hasher = Md5::new(); hasher.update(data); diff --git a/src/models.rs b/src/models.rs index eaf9748..54bccd6 100644 --- a/src/models.rs +++ b/src/models.rs @@ -1,3 +1,5 @@ +//! Data models for ABsmartly context, experiments, and event publishing. + use serde::{Deserialize, Deserializer, Serialize}; use std::collections::HashMap; @@ -9,141 +11,220 @@ where Ok(opt.unwrap_or_default()) } +/// Top-level context data containing all experiment configurations. #[derive(Debug, Clone, Serialize, Deserialize, Default)] #[serde(rename_all = "camelCase")] pub struct ContextData { + /// The list of experiments in this context. #[serde(default)] pub experiments: Vec, } +/// Configuration data for a single experiment. #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ExperimentData { + /// Unique experiment identifier. pub id: i64, + /// Human-readable experiment name. pub name: String, + /// The unit type used for assignment (e.g., `session_id`). #[serde(default)] pub unit_type: Option, + /// Current iteration of the experiment. #[serde(default)] pub iteration: i64, + /// If non-zero, all users are assigned to this variant. #[serde(default)] pub full_on_variant: i64, + /// Traffic allocation split weights. #[serde(default)] pub traffic_split: Vec, + /// High bits of the traffic assignment seed. #[serde(default)] pub traffic_seed_hi: u32, + /// Low bits of the traffic assignment seed. #[serde(default)] pub traffic_seed_lo: u32, + /// JSON audience filter expression. #[serde(default, deserialize_with = "deserialize_null_string")] pub audience: String, + /// When true, audience mismatches result in control assignment. #[serde(default)] pub audience_strict: bool, + /// Variant assignment split weights. #[serde(default)] pub split: Vec, + /// High bits of the variant assignment seed. #[serde(default)] pub seed_hi: u32, + /// Low bits of the variant assignment seed. #[serde(default)] pub seed_lo: u32, + /// Variant configurations. #[serde(default)] pub variants: Vec, + /// Experiment-level variables. #[serde(default)] pub variables: HashMap, + /// Custom field values attached to the experiment. #[serde(default)] pub custom_field_values: Option>, } +/// A variant's configuration payload. #[derive(Debug, Clone, Serialize, Deserialize, Default)] pub struct Variant { + /// JSON configuration string for this variant. #[serde(default)] pub config: Option, } +/// A custom field value associated with an experiment. #[derive(Debug, Clone, Serialize, Deserialize)] pub struct CustomFieldValue { + /// Field name. pub name: String, + /// Field value as a string. pub value: String, + /// Field type (e.g., "text", "number", "json", "boolean"). #[serde(rename = "type")] pub field_type: String, } +/// Tracks the computed assignment for a unit in an experiment. +#[allow(clippy::struct_excessive_bools)] #[derive(Debug, Clone, Default)] pub struct Assignment { + /// Experiment identifier. pub id: i64, + /// Experiment iteration. pub iteration: i64, + /// Full-on variant value from the experiment. pub full_on_variant: i64, + /// The unit type used for this assignment. pub unit_type: Option, + /// The assigned variant index. pub variant: i32, + /// Whether this assignment was overridden. pub overridden: bool, + /// Whether the unit was successfully assigned. pub assigned: bool, + /// Whether the assignment has been exposed (logged). pub exposed: bool, + /// Whether the unit is eligible for the experiment. pub eligible: bool, + /// Whether the experiment is in full-on mode. pub full_on: bool, + /// Whether this is a custom assignment. pub custom: bool, + /// Whether the audience filter did not match. pub audience_mismatch: bool, + /// The traffic split at the time of assignment. pub traffic_split: Option>, + /// Resolved variable values for the assigned variant. pub variables: Option>, + /// Attribute sequence number at the time of assignment. pub attrs_seq: u64, } +/// An exposure event recorded when a treatment is accessed. +#[allow(clippy::struct_excessive_bools)] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Exposure { + /// Experiment identifier. pub id: i64, + /// Experiment name. pub name: String, + /// Timestamp of exposure in milliseconds since epoch. pub exposed_at: i64, + /// The unit identifier. pub unit: Option, + /// The assigned variant index. pub variant: i32, + /// Whether the unit was assigned. pub assigned: bool, + /// Whether the unit was eligible. pub eligible: bool, + /// Whether the assignment was overridden. pub overridden: bool, + /// Whether the experiment is in full-on mode. pub full_on: bool, + /// Whether this is a custom assignment. pub custom: bool, + /// Whether the audience filter did not match. pub audience_mismatch: bool, } +/// A user attribute with its value and timestamp. #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Attribute { + /// Attribute name. pub name: String, + /// Attribute value. pub value: serde_json::Value, + /// Timestamp when the attribute was set, in milliseconds since epoch. pub set_at: i64, } +/// A goal achievement event. #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Goal { + /// Goal name. pub name: String, + /// Optional properties associated with the goal. pub properties: Option>, + /// Timestamp when the goal was achieved, in milliseconds since epoch. pub achieved_at: i64, } +/// A unit identifier used in publish requests. #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Unit { + /// The unit type (e.g., `session_id`). #[serde(rename = "type")] pub unit_type: String, + /// The hashed unit identifier. pub uid: Option, } +/// Parameters sent when publishing context events to the ABsmartly API. #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PublishParams { + /// Timestamp of publication in milliseconds since epoch. pub published_at: i64, + /// Units involved in this publish. pub units: Vec, + /// Whether unit identifiers are hashed. pub hashed: bool, + /// Exposure events to publish. #[serde(skip_serializing_if = "Option::is_none")] pub exposures: Option>, + /// Goal events to publish. #[serde(skip_serializing_if = "Option::is_none")] pub goals: Option>, + /// Attribute events to publish. #[serde(skip_serializing_if = "Option::is_none")] pub attributes: Option>, } +/// The lifecycle state of a context. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum ContextState { + /// Context is loading data. Loading, + /// Context is ready for use. Ready, + /// Context failed to initialize. Failed, + /// Context is publishing final events. Finalizing, + /// Context has been finalized and is no longer usable. Finalized, } @@ -153,13 +234,18 @@ impl Default for ContextState { } } +/// Parameters for creating a new context. #[derive(Debug, Clone)] pub struct ContextParams { + /// Map of unit type to unit identifier. pub units: HashMap, } +/// Options for context behavior. #[derive(Debug, Clone, Default)] pub struct ContextOptions { + /// Delay in milliseconds before auto-publishing events. pub publish_delay: i64, + /// Interval in milliseconds for automatic context refresh. pub refresh_period: i64, } diff --git a/src/murmur3.rs b/src/murmur3.rs index dab8e14..0819392 100644 --- a/src/murmur3.rs +++ b/src/murmur3.rs @@ -1,12 +1,14 @@ -const C1: u32 = 0xcc9e2d51; -const C2: u32 = 0x1b873593; -const C3: u32 = 0xe6546b64; +//! `MurmurHash3` (32-bit) implementation used for deterministic unit assignment. + +const C1: u32 = 0xcc9e_2d51; +const C2: u32 = 0x1b87_3593; +const C3: u32 = 0xe654_6b64; fn fmix32(mut h: u32) -> u32 { h ^= h >> 16; - h = h.wrapping_mul(0x85ebca6b); + h = h.wrapping_mul(0x85eb_ca6b); h ^= h >> 13; - h = h.wrapping_mul(0xc2b2ae35); + h = h.wrapping_mul(0xc2b2_ae35); h ^= h >> 16; h } @@ -19,6 +21,7 @@ fn scramble32(block: u32) -> u32 { rotl32(block.wrapping_mul(C1), 15).wrapping_mul(C2) } +/// Computes a 32-bit `MurmurHash3` of the given byte slice with the specified seed. pub fn murmur3_32(key: &[u8], seed: u32) -> u32 { let mut hash = seed; @@ -36,24 +39,26 @@ pub fn murmur3_32(key: &[u8], seed: u32) -> u32 { let mut remaining: u32 = 0; match key.len() & 3 { 3 => { - remaining ^= (key[i + 2] as u32) << 16; - remaining ^= (key[i + 1] as u32) << 8; - remaining ^= key[i] as u32; + remaining ^= u32::from(key[i + 2]) << 16; + remaining ^= u32::from(key[i + 1]) << 8; + remaining ^= u32::from(key[i]); hash ^= scramble32(remaining); } 2 => { - remaining ^= (key[i + 1] as u32) << 8; - remaining ^= key[i] as u32; + remaining ^= u32::from(key[i + 1]) << 8; + remaining ^= u32::from(key[i]); hash ^= scramble32(remaining); } 1 => { - remaining ^= key[i] as u32; + remaining ^= u32::from(key[i]); hash ^= scramble32(remaining); } _ => {} } - hash ^= key.len() as u32; + #[allow(clippy::cast_possible_truncation)] + let len = key.len() as u32; + hash ^= len; fmix32(hash) } @@ -63,49 +68,49 @@ mod tests { #[test] fn test_empty_string() { - assert_eq!(murmur3_32(b"", 0), 0x00000000); + assert_eq!(murmur3_32(b"", 0), 0x0000_0000); } #[test] fn test_space() { - assert_eq!(murmur3_32(b" ", 0), 0x7ef49b98); + assert_eq!(murmur3_32(b" ", 0), 0x7ef4_9b98); } #[test] fn test_single_char() { - assert_eq!(murmur3_32(b"t", 0), 0xca87df4d); + assert_eq!(murmur3_32(b"t", 0), 0xca87_df4d); } #[test] fn test_two_chars() { - assert_eq!(murmur3_32(b"te", 0), 0xedb8ee1b); + assert_eq!(murmur3_32(b"te", 0), 0xedb8_ee1b); } #[test] fn test_three_chars() { - assert_eq!(murmur3_32(b"tes", 0), 0x0bb90e5a); + assert_eq!(murmur3_32(b"tes", 0), 0x0bb9_0e5a); } #[test] fn test_four_chars() { - assert_eq!(murmur3_32(b"test", 0), 0xba6bd213); + assert_eq!(murmur3_32(b"test", 0), 0xba6b_d213); } #[test] fn test_with_seed_deadbeef() { - assert_eq!(murmur3_32(b"test", 0xdeadbeef), 0xaa22d41a); + assert_eq!(murmur3_32(b"test", 0xdead_beef), 0xaa22_d41a); } #[test] fn test_with_seed_1() { - assert_eq!(murmur3_32(b"test", 1), 0x99c02ae2); + assert_eq!(murmur3_32(b"test", 1), 0x99c0_2ae2); } #[test] fn test_long_string() { assert_eq!( murmur3_32(b"The quick brown fox jumps over the lazy dog", 0), - 0x2e4ff723 + 0x2e4f_f723 ); } } diff --git a/src/sdk.rs b/src/sdk.rs index 11d0b88..9b8de46 100644 --- a/src/sdk.rs +++ b/src/sdk.rs @@ -1,20 +1,31 @@ +//! SDK client for communicating with the ABsmartly API. + use crate::context::Context; use crate::models::{ContextData, ContextOptions}; use reqwest::Client; -use serde::{Deserialize, Serialize}; +use serde::Serialize; +/// Configuration for connecting to the ABsmartly API. #[derive(Debug, Clone)] pub struct SDKConfig { + /// The ABsmartly API endpoint URL. pub endpoint: String, + /// API key for authentication. pub api_key: String, + /// Application name. pub application: String, + /// Environment name (e.g., "production", "development"). pub environment: String, + /// Optional agent identifier. pub agent: Option, + /// Request timeout in milliseconds (default: 3000). pub timeout_ms: Option, + /// Number of retry attempts for failed requests (default: 5). pub retries: Option, } impl SDKConfig { + /// Creates a new SDK configuration with the required fields. pub fn new( endpoint: impl Into, api_key: impl Into, @@ -32,16 +43,22 @@ impl SDKConfig { } } + /// Sets the agent identifier (builder pattern). + #[must_use] pub fn with_agent(mut self, agent: impl Into) -> Self { self.agent = Some(agent.into()); self } + /// Sets the request timeout in milliseconds (builder pattern). + #[must_use] pub fn with_timeout(mut self, timeout_ms: u64) -> Self { self.timeout_ms = Some(timeout_ms); self } + /// Sets the number of retry attempts (builder pattern). + #[must_use] pub fn with_retries(mut self, retries: u32) -> Self { self.retries = Some(retries); self @@ -60,32 +77,43 @@ struct UnitRequest { uid: String, } +/// The main ABsmartly SDK client. +#[derive(Debug)] pub struct SDK { config: SDKConfig, client: Client, } +/// Errors that can occur when using the SDK. #[derive(Debug, thiserror::Error)] pub enum SDKError { + /// An HTTP request to the ABsmartly API failed. #[error("HTTP request failed: {0}")] HttpError(#[from] reqwest::Error), + /// The SDK configuration is invalid. #[error("Invalid configuration: {0}")] ConfigError(String), } impl SDK { + /// Creates a new SDK client with the given configuration. + /// + /// # Errors + /// + /// Returns an error if any required configuration field is empty or if the + /// HTTP client fails to build. pub fn new(config: SDKConfig) -> Result { if config.endpoint.is_empty() { - return Err(SDKError::ConfigError("endpoint is required".to_string())); + return Err(SDKError::ConfigError("endpoint is required".to_owned())); } if config.api_key.is_empty() { - return Err(SDKError::ConfigError("api_key is required".to_string())); + return Err(SDKError::ConfigError("api_key is required".to_owned())); } if config.application.is_empty() { - return Err(SDKError::ConfigError("application is required".to_string())); + return Err(SDKError::ConfigError("application is required".to_owned())); } if config.environment.is_empty() { - return Err(SDKError::ConfigError("environment is required".to_string())); + return Err(SDKError::ConfigError("environment is required".to_owned())); } let client = Client::builder() @@ -97,6 +125,11 @@ impl SDK { Ok(Self { config, client }) } + /// Creates a context by fetching experiment data from the ABsmartly API. + /// + /// # Errors + /// + /// Returns an error if the API request fails after all retry attempts. pub async fn create_context( &self, units: I, @@ -124,7 +157,8 @@ impl SDK { let url = format!("{}/context", self.config.endpoint.trim_end_matches('/')); - let mut retries = self.config.retries.unwrap_or(5); + let max_retries = self.config.retries.unwrap_or(5); + let mut retries = max_retries; let mut last_error = None; while retries > 0 { @@ -144,39 +178,34 @@ impl SDK { Ok(resp) => { if resp.status().is_success() { let data: ContextData = resp.json().await?; - return Ok(self.create_context_with_internal(units_vec, data, options)); + return Ok(Self::build_context(units_vec, data, options)); } else if resp.status().is_server_error() { retries -= 1; - last_error = Some(SDKError::HttpError( - resp.error_for_status().unwrap_err(), - )); - tokio::time::sleep(std::time::Duration::from_millis( - 50 * (2_u64.pow((self.config.retries.unwrap_or(5) - retries) as u32)), - )) - .await; - continue; - } else { - return Err(SDKError::HttpError(resp.error_for_status().unwrap_err())); + if let Err(e) = resp.error_for_status() { + last_error = Some(SDKError::HttpError(e)); + } + } else if let Err(e) = resp.error_for_status() { + return Err(SDKError::HttpError(e)); } } Err(e) => { retries -= 1; last_error = Some(SDKError::HttpError(e)); - if retries > 0 { - tokio::time::sleep(std::time::Duration::from_millis( - 50 * (2_u64.pow((self.config.retries.unwrap_or(5) - retries) as u32)), - )) - .await; - } } } + + if retries > 0 { + let backoff = 50 * 2_u64.pow(max_retries - retries); + tokio::time::sleep(std::time::Duration::from_millis(backoff)).await; + } } Err(last_error.unwrap_or_else(|| { - SDKError::ConfigError("Failed to create context after retries".to_string()) + SDKError::ConfigError("Failed to create context after retries".to_owned()) })) } + /// Creates a context with pre-fetched experiment data. pub fn create_context_with( &self, units: I, @@ -192,18 +221,17 @@ impl SDK { .into_iter() .map(|(k, v)| (k.into(), v.into())) .collect(); - self.create_context_with_internal(units_vec, data, options) + Self::build_context(units_vec, data, options) } - fn create_context_with_internal( - &self, + fn build_context( units: Vec<(String, String)>, data: ContextData, _options: Option, ) -> Context { let mut context = Context::new(data); for (unit_type, uid) in units { - let _ = context.set_unit(&unit_type, &uid); + let _ignored = context.set_unit(&unit_type, &uid); } context } @@ -224,7 +252,9 @@ mod tests { } fn make_context_data() -> ContextData { - ContextData { experiments: vec![] } + ContextData { + experiments: vec![], + } } #[test] @@ -257,7 +287,10 @@ mod tests { ); assert_eq!(context.get_unit("session_id"), Some(&"user123".to_string())); - assert_eq!(context.get_unit("device_id"), Some(&"device456".to_string())); + assert_eq!( + context.get_unit("device_id"), + Some(&"device456".to_string()) + ); } #[test] @@ -273,7 +306,10 @@ mod tests { let context = sdk.create_context_with(units, data, None); assert_eq!(context.get_unit("session_id"), Some(&"user123".to_string())); - assert_eq!(context.get_unit("device_id"), Some(&"device456".to_string())); + assert_eq!( + context.get_unit("device_id"), + Some(&"device456".to_string()) + ); } #[test] @@ -288,7 +324,10 @@ mod tests { let context = sdk.create_context_with(units, data, None); assert_eq!(context.get_unit("session_id"), Some(&"user123".to_string())); - assert_eq!(context.get_unit("device_id"), Some(&"device456".to_string())); + assert_eq!( + context.get_unit("device_id"), + Some(&"device456".to_string()) + ); } #[test] diff --git a/src/utils.rs b/src/utils.rs index 138c653..ccddd15 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,16 +1,21 @@ +//! Utility functions for hashing, encoding, and variant selection. + use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine}; use crate::md5::md5; +/// Encodes the given bytes as a URL-safe base64 string without padding. pub fn base64_url_no_padding(data: &[u8]) -> String { URL_SAFE_NO_PAD.encode(data) } +/// Hashes a unit value using MD5 and returns the result as a URL-safe base64 string. pub fn hash_unit(value: &str) -> String { let hash = md5(value.as_bytes()); base64_url_no_padding(&hash) } +/// Selects a variant index from a probability split based on the given probability value. pub fn choose_variant(split: &[f64], prob: f64) -> usize { let mut cum_sum = 0.0; for (i, &weight) in split.iter().enumerate() { @@ -22,8 +27,9 @@ pub fn choose_variant(split: &[f64], prob: f64) -> usize { split.len().saturating_sub(1) } +/// Compares two slices for element-wise equality. pub fn array_equals_shallow(a: &[T], b: &[T]) -> bool { - a.len() == b.len() && a.iter().zip(b.iter()).all(|(x, y)| x == y) + a == b } #[cfg(test)] @@ -51,7 +57,10 @@ mod tests { #[test] fn test_base64_url_no_padding_special_chars() { let special = "special characters açb↓c".as_bytes(); - assert_eq!(base64_url_no_padding(special), "c3BlY2lhbCBjaGFyYWN0ZXJzIGHDp2LihpNj"); + assert_eq!( + base64_url_no_padding(special), + "c3BlY2lhbCBjaGFyYWN0ZXJzIGHDp2LihpNj" + ); } #[test] From c00866a7008c83b012dcfd5138b32684a4aa374a Mon Sep 17 00:00:00 2001 From: Cal Courtney Date: Mon, 16 Mar 2026 09:31:47 +0000 Subject: [PATCH 2/9] fix: clippy warnings --- Cargo.lock | 497 ++++++++++++++++++++++++++++++------------------- Cargo.toml | 1 - src/models.rs | 9 +- src/murmur3.rs | 2 +- 4 files changed, 313 insertions(+), 196 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8e45df1..a191e6e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 4 +version = 3 [[package]] name = "absmartly-sdk" @@ -25,6 +25,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + [[package]] name = "atomic-waker" version = "1.1.2" @@ -39,9 +45,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "bitflags" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" [[package]] name = "block-buffer" @@ -54,21 +60,21 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.19.1" +version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" [[package]] name = "bytes" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cc" -version = "1.2.54" +version = "1.2.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" +checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" dependencies = [ "find-msvc-tools", "shlex", @@ -90,6 +96,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -160,9 +176,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "find-msvc-tools" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fnv" @@ -170,6 +186,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -196,41 +218,40 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-sink" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.31" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-core", "futures-task", "pin-project-lite", - "pin-utils", "slab", ] @@ -257,14 +278,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.4" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", "libc", "r-efi", "wasip2", + "wasip3", ] [[package]] @@ -286,12 +308,27 @@ dependencies = [ "tracing", ] +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + [[package]] name = "hashbrown" version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "http" version = "1.4.0" @@ -387,14 +424,13 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ "base64", "bytes", "futures-channel", - "futures-core", "futures-util", "http", "http-body", @@ -492,6 +528,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "idna" version = "1.1.0" @@ -520,14 +562,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.16.1", + "serde", + "serde_core", ] [[package]] name = "ipnet" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "iri-string" @@ -547,25 +591,31 @@ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "js-sys" -version = "0.3.85" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" dependencies = [ "once_cell", "wasm-bindgen", ] +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "libc" -version = "0.2.180" +version = "0.2.183" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" [[package]] name = "linux-raw-sys" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" @@ -600,9 +650,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "mime" @@ -623,9 +673,9 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.14" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" dependencies = [ "libc", "log", @@ -640,15 +690,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "openssl" -version = "0.10.75" +version = "0.10.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" +checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf" dependencies = [ "bitflags", "cfg-if", @@ -672,15 +722,15 @@ dependencies = [ [[package]] name = "openssl-probe" -version = "0.1.6" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "openssl-sys" -version = "0.9.111" +version = "0.9.112" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" +checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb" dependencies = [ "cc", "libc", @@ -719,9 +769,9 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pin-utils" @@ -744,6 +794,16 @@ dependencies = [ "zerovec", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro2" version = "1.0.106" @@ -755,18 +815,18 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] [[package]] name = "r-efi" -version = "5.3.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "redox_syscall" @@ -779,9 +839,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -791,9 +851,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -802,9 +862,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "reqwest" @@ -862,9 +922,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ "bitflags", "errno", @@ -875,9 +935,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.36" +version = "0.23.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" dependencies = [ "once_cell", "rustls-pki-types", @@ -914,15 +974,15 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" [[package]] name = "schannel" -version = "0.1.28" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" dependencies = [ "windows-sys 0.61.2", ] @@ -935,12 +995,12 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "2.11.1" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ "bitflags", - "core-foundation", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -948,14 +1008,20 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.15.0" +version = "2.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" dependencies = [ "core-foundation-sys", "libc", ] +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + [[package]] name = "serde" version = "1.0.228" @@ -1029,9 +1095,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "smallvec" @@ -1041,12 +1107,12 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "socket2" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -1063,9 +1129,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.114" +version = "2.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" dependencies = [ "proc-macro2", "quote", @@ -1094,12 +1160,12 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" dependencies = [ "bitflags", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -1115,12 +1181,12 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.24.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.2", "once_cell", "rustix", "windows-sys 0.61.2", @@ -1158,9 +1224,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.49.0" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ "bytes", "libc", @@ -1175,9 +1241,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" dependencies = [ "proc-macro2", "quote", @@ -1295,9 +1361,15 @@ checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "unicode-ident" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "untrusted" @@ -1359,11 +1431,20 @@ dependencies = [ "wit-bindgen", ] +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen", +] + [[package]] name = "wasm-bindgen" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" dependencies = [ "cfg-if", "once_cell", @@ -1374,9 +1455,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.58" +version = "0.4.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" dependencies = [ "cfg-if", "futures-util", @@ -1388,9 +1469,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1398,9 +1479,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" dependencies = [ "bumpalo", "proc-macro2", @@ -1411,18 +1492,52 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.108" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "web-sys" -version = "0.3.85" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" dependencies = [ "js-sys", "wasm-bindgen", @@ -1469,16 +1584,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets 0.53.5", + "windows-targets", ] [[package]] @@ -1496,31 +1602,14 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm 0.53.1", - "windows_aarch64_msvc 0.53.1", - "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", - "windows_i686_msvc 0.53.1", - "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", - "windows_x86_64_msvc 0.53.1", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] @@ -1529,60 +1618,30 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -1590,40 +1649,104 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" +name = "windows_x86_64_gnullvm" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] -name = "windows_x86_64_gnullvm" +name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" +name = "wit-bindgen" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] [[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" +name = "wit-bindgen-core" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] [[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" +name = "wit-bindgen-rust" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] [[package]] -name = "wit-bindgen" +name = "wit-bindgen-rust-macro" version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] [[package]] name = "writeable" @@ -1716,6 +1839,6 @@ dependencies = [ [[package]] name = "zmij" -version = "1.0.17" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02aae0f83f69aafc94776e879363e9771d7ecbffe2c7fbb6c14c5e00dfe88439" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml index 49ed17a..e8d83e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,6 @@ wildcard_imports = "warn" enum_glob_use = "warn" rc_buffer = "warn" str_to_string = "warn" -string_to_string = "warn" inefficient_to_string = "warn" implicit_clone = "warn" needless_pass_by_value = "warn" diff --git a/src/models.rs b/src/models.rs index 54bccd6..d75b7bb 100644 --- a/src/models.rs +++ b/src/models.rs @@ -214,9 +214,10 @@ pub struct PublishParams { } /// The lifecycle state of a context. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum ContextState { /// Context is loading data. + #[default] Loading, /// Context is ready for use. Ready, @@ -228,12 +229,6 @@ pub enum ContextState { Finalized, } -impl Default for ContextState { - fn default() -> Self { - Self::Loading - } -} - /// Parameters for creating a new context. #[derive(Debug, Clone)] pub struct ContextParams { diff --git a/src/murmur3.rs b/src/murmur3.rs index 0819392..fbae8b6 100644 --- a/src/murmur3.rs +++ b/src/murmur3.rs @@ -14,7 +14,7 @@ fn fmix32(mut h: u32) -> u32 { } fn rotl32(a: u32, b: u32) -> u32 { - (a << b) | (a >> (32 - b)) + a.rotate_left(b) } fn scramble32(block: u32) -> u32 { From cf5a0a9c8707509075dbdea58838a6342c76d80c Mon Sep 17 00:00:00 2001 From: Cal Courtney Date: Mon, 16 Mar 2026 09:36:07 +0000 Subject: [PATCH 3/9] fix: resolve CI failures for MSRV and latest clippy --- Cargo.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a191e6e..04892e0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -740,9 +740,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.5" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -750,15 +750,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.12" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-link", + "windows-targets", ] [[package]] From 40d6a936dc0ee16240991f791590208d3493c732 Mon Sep 17 00:00:00 2001 From: Cal Courtney Date: Mon, 16 Mar 2026 09:39:59 +0000 Subject: [PATCH 4/9] fix: bump MSRV to 1.83 to match dependency requirements --- .github/workflows/ci.yml | 2 +- Cargo.lock | 12 ++++++------ Cargo.toml | 2 +- clippy.toml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 00d4fa0..e2e2a8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - rust: [stable, "1.70.0"] + rust: [stable, "1.83.0"] steps: - uses: actions/checkout@v4 diff --git a/Cargo.lock b/Cargo.lock index 04892e0..81901fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "absmartly-sdk" @@ -740,9 +740,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.3" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", "parking_lot_core", @@ -750,15 +750,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.10" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-link", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e8d83e2..bd61f1d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" keywords = ["absmartly", "ab-testing", "feature-flags", "experimentation", "sdk"] categories = ["development-tools", "web-programming"] exclude = [".github/", "target/", ".claude/"] -rust-version = "1.70" +rust-version = "1.83" [lints.rust] unsafe_code = "forbid" diff --git a/clippy.toml b/clippy.toml index dfe0b66..9ec8e1a 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1,2 +1,2 @@ -msrv = "1.70" +msrv = "1.83" doc-valid-idents = ["ABsmartly", "GitHub", "JavaScript", "TypeScript"] From e5f3ac95ba2df7e5b01eaf7303d44854fe8c8d64 Mon Sep 17 00:00:00 2001 From: Cal Courtney Date: Mon, 16 Mar 2026 09:43:14 +0000 Subject: [PATCH 5/9] fix: pin native-tls for macOS MSRV compat, use --locked in CI --- .github/workflows/ci.yml | 2 +- Cargo.lock | 32 +++++++++++--------------------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2e2a8e..e54aa27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: key: ${{ matrix.rust }} - name: Run tests - run: cargo test --verbose + run: cargo test --locked --verbose lint: name: Lint diff --git a/Cargo.lock b/Cargo.lock index 81901fe..7d856f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -96,16 +96,6 @@ dependencies = [ "libc", ] -[[package]] -name = "core-foundation" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -165,7 +155,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -673,9 +663,9 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.18" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" dependencies = [ "libc", "log", @@ -722,9 +712,9 @@ dependencies = [ [[package]] name = "openssl-probe" -version = "0.2.1" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" @@ -930,7 +920,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -995,12 +985,12 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "security-framework" -version = "3.7.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags", - "core-foundation 0.10.1", + "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", @@ -1165,7 +1155,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" dependencies = [ "bitflags", - "core-foundation 0.9.4", + "core-foundation", "system-configuration-sys", ] @@ -1189,7 +1179,7 @@ dependencies = [ "getrandom 0.4.2", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] From 0d5c36c8aefebdaae9be39a2ef9167b77e242fb0 Mon Sep 17 00:00:00 2001 From: Cal Courtney Date: Mon, 16 Mar 2026 09:46:52 +0000 Subject: [PATCH 6/9] chore: gitignore Cargo.lock --- .github/workflows/ci.yml | 2 +- .gitignore | 1 + Cargo.lock | 1834 -------------------------------------- 3 files changed, 2 insertions(+), 1835 deletions(-) delete mode 100644 Cargo.lock diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e54aa27..e2e2a8e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: key: ${{ matrix.rust }} - name: Run tests - run: cargo test --locked --verbose + run: cargo test --verbose lint: name: Lint diff --git a/.gitignore b/.gitignore index 194196e..d41be48 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ Thumbs.db # Claude .claude/ +Cargo.lock diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 7d856f0..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,1834 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "absmartly-sdk" -version = "0.1.0" -dependencies = [ - "base64", - "md-5", - "regex", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", -] - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - -[[package]] -name = "anyhow" -version = "1.0.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bitflags" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" - -[[package]] -name = "bytes" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" - -[[package]] -name = "cc" -version = "1.2.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" -dependencies = [ - "find-msvc-tools", - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "crypto-common" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "find-msvc-tools" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" - -[[package]] -name = "futures-sink" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" - -[[package]] -name = "futures-task" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" - -[[package]] -name = "futures-util" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" -dependencies = [ - "futures-core", - "futures-task", - "pin-project-lite", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "getrandom" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", - "wasip3", -] - -[[package]] -name = "h2" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" -dependencies = [ - "foldhash", -] - -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "http" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" -dependencies = [ - "bytes", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "hyper" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" -dependencies = [ - "atomic-waker", - "bytes", - "futures-channel", - "futures-core", - "h2", - "http", - "http-body", - "httparse", - "itoa", - "pin-project-lite", - "pin-utils", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" -dependencies = [ - "http", - "hyper", - "hyper-util", - "rustls", - "rustls-pki-types", - "tokio", - "tokio-rustls", - "tower-service", -] - -[[package]] -name = "hyper-tls" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" -dependencies = [ - "bytes", - "http-body-util", - "hyper", - "hyper-util", - "native-tls", - "tokio", - "tokio-native-tls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" -dependencies = [ - "base64", - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "hyper", - "ipnet", - "libc", - "percent-encoding", - "pin-project-lite", - "socket2", - "system-configuration", - "tokio", - "tower-service", - "tracing", - "windows-registry", -] - -[[package]] -name = "icu_collections" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" -dependencies = [ - "displaydoc", - "potential_utf", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" - -[[package]] -name = "icu_properties" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" -dependencies = [ - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" - -[[package]] -name = "icu_provider" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" -dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - -[[package]] -name = "idna" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "indexmap" -version = "2.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" -dependencies = [ - "equivalent", - "hashbrown 0.16.1", - "serde", - "serde_core", -] - -[[package]] -name = "ipnet" -version = "2.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" - -[[package]] -name = "iri-string" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "itoa" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" - -[[package]] -name = "js-sys" -version = "0.3.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - -[[package]] -name = "libc" -version = "0.2.183" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" - -[[package]] -name = "linux-raw-sys" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" - -[[package]] -name = "litemap" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" - -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] - -[[package]] -name = "memchr" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "mio" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.61.2", -] - -[[package]] -name = "native-tls" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "once_cell" -version = "1.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" - -[[package]] -name = "openssl" -version = "0.10.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "openssl-probe" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - -[[package]] -name = "openssl-sys" -version = "0.9.112" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "parking_lot" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", -] - -[[package]] -name = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - -[[package]] -name = "pin-project-lite" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "potential_utf" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" -dependencies = [ - "zerovec", -] - -[[package]] -name = "prettyplease" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" -dependencies = [ - "proc-macro2", - "syn", -] - -[[package]] -name = "proc-macro2" -version = "1.0.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" - -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" - -[[package]] -name = "reqwest" -version = "0.12.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-tls", - "hyper-util", - "js-sys", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-native-tls", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "ring" -version = "0.17.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.17", - "libc", - "untrusted", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustix" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.23.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" -dependencies = [ - "once_cell", - "rustls-pki-types", - "rustls-webpki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustls-pki-types" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" -dependencies = [ - "zeroize", -] - -[[package]] -name = "rustls-webpki" -version = "0.103.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" -dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", -] - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "ryu" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" - -[[package]] -name = "schannel" -version = "0.1.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.149" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" -dependencies = [ - "itoa", - "memchr", - "serde", - "serde_core", - "zmij", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" -dependencies = [ - "errno", - "libc", -] - -[[package]] -name = "slab" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "socket2" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "2.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" -dependencies = [ - "futures-core", -] - -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "system-configuration" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" -dependencies = [ - "bitflags", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tempfile" -version = "3.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" -dependencies = [ - "fastrand", - "getrandom 0.4.2", - "once_cell", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tinystr" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tokio" -version = "1.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" -dependencies = [ - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.61.2", -] - -[[package]] -name = "tokio-macros" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tower" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-http" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" -dependencies = [ - "bitflags", - "bytes", - "futures-util", - "http", - "http-body", - "iri-string", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "typenum" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" - -[[package]] -name = "unicode-ident" -version = "1.0.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasip2" -version = "1.0.2+wasi-0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" -dependencies = [ - "cfg-if", - "futures-util", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags", - "hashbrown 0.15.5", - "indexmap", - "semver", -] - -[[package]] -name = "web-sys" -version = "0.3.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[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", -] - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck", - "indexmap", - "prettyplease", - "syn", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags", - "indexmap", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] - -[[package]] -name = "writeable" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" - -[[package]] -name = "yoke" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" -dependencies = [ - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerofrom" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zeroize" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" - -[[package]] -name = "zerotrie" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "zmij" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" From 76a01394243614f505590ddf5a46d13d1543eb2d Mon Sep 17 00:00:00 2001 From: Cal Courtney Date: Mon, 16 Mar 2026 09:50:41 +0000 Subject: [PATCH 7/9] fix: bump MSRV to 1.85 for security-framework edition 2024 on macOS --- .github/workflows/ci.yml | 2 +- Cargo.toml | 2 +- clippy.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2e2a8e..2169a02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - rust: [stable, "1.83.0"] + rust: [stable, "1.85.0"] steps: - uses: actions/checkout@v4 diff --git a/Cargo.toml b/Cargo.toml index bd61f1d..5dff6fa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" keywords = ["absmartly", "ab-testing", "feature-flags", "experimentation", "sdk"] categories = ["development-tools", "web-programming"] exclude = [".github/", "target/", ".claude/"] -rust-version = "1.83" +rust-version = "1.85" [lints.rust] unsafe_code = "forbid" diff --git a/clippy.toml b/clippy.toml index 9ec8e1a..b1248b8 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1,2 +1,2 @@ -msrv = "1.83" +msrv = "1.85" doc-valid-idents = ["ABsmartly", "GitHub", "JavaScript", "TypeScript"] From bc457e9a6cb22975517e66742cf53ff1e269eae7 Mon Sep 17 00:00:00 2001 From: Cal Courtney Date: Mon, 16 Mar 2026 09:54:32 +0000 Subject: [PATCH 8/9] fix: commit Cargo.lock and use --locked in CI for reproducible builds --- .github/workflows/ci.yml | 2 +- .gitignore | 1 - Cargo.lock | 1844 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 1845 insertions(+), 2 deletions(-) create mode 100644 Cargo.lock diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2169a02..036b7d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: key: ${{ matrix.rust }} - name: Run tests - run: cargo test --verbose + run: cargo test --locked --verbose lint: name: Lint diff --git a/.gitignore b/.gitignore index d41be48..194196e 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,3 @@ Thumbs.db # Claude .claude/ -Cargo.lock diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..81901fe --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1844 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "absmartly-sdk" +version = "0.1.0" +dependencies = [ + "base64", + "md-5", + "regex", + "reqwest", + "serde", + "serde_json", + "thiserror", + "tokio", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "anyhow" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "cc" +version = "1.2.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" + +[[package]] +name = "futures-sink" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" + +[[package]] +name = "futures-task" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" + +[[package]] +name = "futures-util" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", + "wasip3", +] + +[[package]] +name = "h2" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "system-configuration", + "tokio", + "tower-service", + "tracing", + "windows-registry", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", + "serde", + "serde_core", +] + +[[package]] +name = "ipnet" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + +[[package]] +name = "iri-string" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "js-sys" +version = "0.3.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "libc" +version = "0.2.183" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest", +] + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "native-tls" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "openssl" +version = "0.10.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "951c002c75e16ea2c65b8c7e4d3d51d5530d8dfa7d060b4776828c88cfb18ecf" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + +[[package]] +name = "openssl-sys" +version = "0.9.112" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57d55af3b3e226502be1526dfdba67ab0e9c96fc293004e79576b2b9edb0dbdb" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "reqwest" +version = "0.12.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" +dependencies = [ + "zeroize", +] + +[[package]] +name = "rustls-webpki" +version = "0.103.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags", + "core-foundation 0.10.1", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "system-configuration" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" +dependencies = [ + "bitflags", + "core-foundation 0.9.4", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.2", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" +dependencies = [ + "cfg-if", + "futures-util", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + +[[package]] +name = "web-sys" +version = "0.3.91" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[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", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" From 8f8d7f4e44cbd7be1d94aa49ce0955b7ded7a3ca Mon Sep 17 00:00:00 2001 From: Cal Courtney Date: Mon, 16 Mar 2026 09:58:55 +0000 Subject: [PATCH 9/9] chore: update GitHub Actions to latest versions --- .github/workflows/ci.yml | 6 +++--- .github/workflows/publish.yml | 14 +++++--------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 036b7d5..18b4ae7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: rust: [stable, "1.85.0"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install Rust uses: dtolnay/rust-toolchain@master @@ -38,7 +38,7 @@ jobs: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install Rust uses: dtolnay/rust-toolchain@stable @@ -57,7 +57,7 @@ jobs: name: Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install Rust uses: dtolnay/rust-toolchain@stable diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 42ee8ed..ae4fa88 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,27 +13,23 @@ jobs: name: Test before publish runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install Rust - uses: dtolnay/rust-action@stable - with: - toolchain: stable + uses: dtolnay/rust-toolchain@stable - name: Run tests - run: cargo test --verbose + run: cargo test --locked --verbose publish: name: Publish to crates.io needs: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install Rust - uses: dtolnay/rust-action@stable - with: - toolchain: stable + uses: dtolnay/rust-toolchain@stable - name: Verify version matches tag run: |