From 40cd088d9ffc5b7763279c9dbad116ab1af4190e Mon Sep 17 00:00:00 2001 From: drewconnelly-qntm Date: Wed, 8 Jul 2026 08:55:19 -0600 Subject: [PATCH 1/8] Basic functionality for seed-saving completed. --- crates/pecos-engines/src/monte_carlo.rs | 2 +- .../pecos-engines/src/monte_carlo/engine.rs | 253 +++++++++++++++++- 2 files changed, 250 insertions(+), 5 deletions(-) diff --git a/crates/pecos-engines/src/monte_carlo.rs b/crates/pecos-engines/src/monte_carlo.rs index 43557d7e9..e971317b8 100644 --- a/crates/pecos-engines/src/monte_carlo.rs +++ b/crates/pecos-engines/src/monte_carlo.rs @@ -14,4 +14,4 @@ pub mod builder; pub mod engine; pub use builder::MonteCarloEngineBuilder; -pub use engine::MonteCarloEngine; +pub use engine::{MonteCarloEngine, SeedReport, WorkerSeedRecord}; diff --git a/crates/pecos-engines/src/monte_carlo/engine.rs b/crates/pecos-engines/src/monte_carlo/engine.rs index 6afc7adb9..0f4d7474e 100644 --- a/crates/pecos-engines/src/monte_carlo/engine.rs +++ b/crates/pecos-engines/src/monte_carlo/engine.rs @@ -30,6 +30,8 @@ use rayon::{ }; use std::any::Any; use std::collections::BTreeMap; +use std::fs; +use std::path::Path; use std::sync::{Arc, Mutex}; use super::builder::MonteCarloEngineBuilder; @@ -269,11 +271,41 @@ impl MonteCarloEngine { /// # Panics /// - If `num_shots` is zero. /// - If `num_workers` is zero. - pub fn run_with_workers( + pub fn run_with_workers(&mut self, num_shots: usize, num_workers: usize) -> Result { + let (shots, _) = self.run_with_workers_seed_report(num_shots, num_workers, false)?; + Ok(shots) + } + + /// Run the Monte Carlo simulation with a specified number of worker threads and return the RNG seed report. + /// + /// The seed report records the engine root seed, the derived base seed, and each worker's + /// deterministic seed and shot count so the run can be reproduced or audited. + /// This method runs the simulation with the specified number of shots and worker threads, + /// overriding the default worker count configured during construction. + /// + /// # Arguments + /// * `num_shots` - The number of shots to run + /// * `num_workers` - The number of parallel worker threads to use + /// * `save_seed_report` - When `true`, save the seed report to `seed_report.json`; + /// when `false`, only return it from this method. + /// + /// # Returns + /// A tuple containing the aggregated shot results and the seed report for the run. The seed + /// report is returned regardless of whether it is saved to disk. + /// + /// # Errors + /// Returns a `PecosError` if any part of the simulation fails, or if saving the seed + /// report fails when `save_seed_report` is `true`. + /// + /// # Panics + /// - If `num_shots` is zero. + /// - If `num_workers` is zero. + pub fn run_with_workers_seed_report( &mut self, num_shots: usize, num_workers: usize, - ) -> Result { + save_seed_report: bool, + ) -> Result<(ShotVec, SeedReport), PecosError> { assert!(num_shots > 0, "num_shots cannot be zero"); assert!(num_workers > 0, "num_workers cannot be zero"); @@ -288,6 +320,24 @@ impl MonteCarloEngine { let shots_per_worker = distribute_shots(num_shots, num_workers); let base_seed = self.rng.next_u64(); + // Create Seed Report to save with run + let seed_report = SeedReport { + root_seed: self.seed, + base_seed, + num_shots, + num_workers, + workers: (0..num_workers) + .map(|worker_idx| { + let seed = derive_seed(base_seed, &format!("worker_{worker_idx}")); + WorkerSeedRecord { + worker_idx, + shots: shots_per_worker[worker_idx], + seed, + } + }) + .collect(), + }; + // CRITICAL: Pre-create worker engines on the main thread before parallel execution. // This avoids potential deadlocks when worker threads try to clone engines // simultaneously, which can trigger concurrent library loading operations @@ -295,8 +345,7 @@ impl MonteCarloEngine { let worker_engines: Vec<_> = (0..num_workers) .map(|worker_idx| { let mut engine = self.hybrid_engine_template.clone(); - let worker_seed = derive_seed(base_seed, &format!("worker_{worker_idx}")); - engine.set_seed(worker_seed); + engine.set_seed(seed_report.workers[worker_idx].seed); (worker_idx, shots_per_worker[worker_idx], engine) }) .collect(); @@ -382,6 +431,149 @@ impl MonteCarloEngine { let combined_results = ShotVec::from_measurements(&shot_results); debug!("Monte Carlo simulation completed successfully"); + + if save_seed_report { + Self::save_seed_report_json(&seed_report, "seed_report.json")?; + debug!("Seed report successfully saved!"); + } + + Ok((combined_results, seed_report)) + } + + /// Serializes `seed_report` to JSON and writes it to `filename`. + /// + /// # Errors + /// Returns a `PecosError` if serialization fails or if the file cannot be written. + pub fn save_seed_report_json( + seed_report: &SeedReport, + filename: &str, + ) -> Result<(), PecosError> { + let json = serde_json::to_vec(seed_report).map_err(|e| { + PecosError::Processing(format!("Failed to serialize seed report: {e}")) + })?; + std::fs::write(filename, json)?; + Ok(()) + } + + pub fn rerun_from_seed_report( + &mut self, + seed_report_filename: &str, + ) -> Result { + + // Import seed report from user's file. + let seed_report = SeedReport::from_json_file(Path::new(seed_report_filename))?; + debug!("SeedReport successfully imported!"); + + // Import shot count, worker count, and all seeds from seed report. + let num_shots = seed_report.num_shots; + let num_workers = seed_report.num_workers; + let shots_per_worker = distribute_shots(num_shots, num_workers); + self.seed = seed_report.root_seed; // make sure to update root seed. + + assert!(num_shots > 0, "num_shots cannot be zero"); + assert!(num_workers > 0, "num_workers cannot be zero"); + + debug!("Running Monte Carlo simulation: {num_shots} shots, {num_workers} workers"); + + // Shared results collection + let results_vec = Arc::new(Mutex::new(Vec::<(usize, usize, Shot)>::with_capacity( + num_shots, + ))); + + // CRITICAL: Pre-create worker engines on the main thread before parallel execution. + // This avoids potential deadlocks when worker threads try to clone engines + // simultaneously, which can trigger concurrent library loading operations + // that contend with each other or the dynamic linker. + let worker_engines: Vec<_> = (0..num_workers) + .map(|worker_idx| { + let mut engine = self.hybrid_engine_template.clone(); + engine.set_seed(seed_report.workers[worker_idx].seed); + (worker_idx, shots_per_worker[worker_idx], engine) + }) + .collect(); + + // Create a dedicated thread pool for this simulation to avoid contention + // with global Rayon thread pool when multiple simulations run concurrently. + // CRITICAL: For QIS programs, we need to ensure each test gets its own + // isolated thread pool to prevent TLS conflicts during library cleanup. + let thread_pool = ThreadPoolBuilder::new() + .num_threads(num_workers) + .thread_name(|index| format!("pecos-mc-worker-{index}")) + .build() + .map_err(|e| PecosError::Processing(format!("Failed to create thread pool: {e}")))?; + + // Run shots in parallel across workers using dedicated thread pool + // CRITICAL: Use install() to ensure all work completes before thread pool cleanup + let parallel_result = thread_pool.install(|| { + worker_engines + .into_par_iter() + .map(|(worker_idx, shots_this_worker, mut engine)| { + if shots_this_worker == 0 { + return Ok(()); + } + + // Process all shots for this worker + debug!("Worker {worker_idx} running {shots_this_worker} shots"); + + for shot_idx in 0..shots_this_worker { + engine.reset()?; + + // Catch panics during shot execution and convert to PecosError + let shot_result = + std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { + engine.run_shot() + })); + + let shot_result = match shot_result { + Ok(Ok(result)) => result, + Ok(Err(e)) => return Err(e), + Err(panic_payload) => { + // Convert panic to PecosError + let panic_msg = + if let Some(s) = panic_payload.downcast_ref::() { + s.clone() + } else if let Some(s) = panic_payload.downcast_ref::<&str>() { + (*s).to_string() + } else { + "Unknown panic occurred during shot execution".to_string() + }; + + return Err(PecosError::Processing(format!( + "Shot execution failed: {panic_msg}" + ))); + } + }; + + // Store with worker/shot indices for deterministic ordering + results_vec.lock().expect("results mutex poisoned").push(( + worker_idx, + shot_idx, + shot_result, + )); + } + + Ok(()) + }) + .collect::, PecosError>>() + }); + + // Handle the parallel execution result + parallel_result?; + + // CRITICAL: Explicitly drop the thread pool to ensure clean shutdown + // This helps prevent TLS issues during test cleanup + drop(thread_pool); + + // Ensure deterministic ordering of results + let mut results = results_vec.lock().expect("results mutex poisoned"); + results.sort_by(|(w1, s1, _), (w2, s2, _)| w1.cmp(w2).then(s1.cmp(s2))); + + // Convert to final results format + let shot_results: Vec = results.iter().map(|(_, _, shot)| shot.clone()).collect(); + let combined_results = ShotVec::from_measurements(&shot_results); + + debug!("Monte Carlo simulation completed successfully"); + Ok(combined_results) } @@ -622,6 +814,59 @@ fn distribute_shots(num_shots: usize, num_workers: usize) -> Vec { result } +/// Seed metadata for one Monte Carlo worker. +/// +/// Each record captures the worker index, the number of shots assigned to that +/// worker, and the deterministic seed used to initialize its cloned engine. +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +pub struct WorkerSeedRecord { + pub worker_idx: usize, + pub shots: usize, + pub seed: u64, +} + +/// Reproducibility metadata captured for a Monte Carlo simulation run. +/// +/// The report records the engine's root seed, the base seed drawn for this run, +/// the shot and worker configuration, and the deterministic seed assigned to +/// each worker. +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +pub struct SeedReport { + pub root_seed: u64, + pub base_seed: u64, + pub num_shots: usize, + pub num_workers: usize, + pub workers: Vec, +} + +/// JSON import helpers for `SeedReport`. +/// +/// Use these constructors to reload reproducibility metadata emitted by a +/// previous Monte Carlo run when rerunning or investigating specific worker +/// seeds. +impl SeedReport { + /// Deserializes a `SeedReport` from a JSON string. + /// + /// Returns `PecosError::Input` when the JSON is malformed or does not match + /// the expected seed report schema. + pub fn from_json_str(json: &str) -> Result { + serde_json::from_str(json).map_err(|err| { + PecosError::Input(format!("Failed to parse seed report JSON: {err}")) + }) + } + + /// Reads and deserializes a `SeedReport` from a JSON file. + /// + /// Returns `PecosError::Input` when the file cannot be read or the file + /// contents cannot be parsed as a seed report. + pub fn from_json_file>(path: P) -> Result { + let json = fs::read_to_string(path).map_err(|err| { + PecosError::Input(format!("Failed to read seed report JSON: {err}")) + })?; + Self::from_json_str(&json) + } +} + /// An external classical engine implementation used for testing and examples. /// /// This implementation provides a basic classical engine that returns predetermined results From 0da037376c45e8cf8538d581284724f865cf85d8 Mon Sep 17 00:00:00 2001 From: drewconnelly-qntm Date: Mon, 27 Jul 2026 12:58:48 -0600 Subject: [PATCH 2/8] SeedReport testing Testing the following: - tests seedreport data saving correctly - tests determinism when seeds are the same, and disagreement when seeds are not - tests agreement between a job and the re-running of that job - tests loading a seed report from json and string, as well as failure when no file exists to import from. --- Cargo.lock | 1 + crates/pecos-engines/Cargo.toml | 3 + .../pecos-engines/src/monte_carlo/engine.rs | 6 +- crates/pecos-engines/tests/seed_report.rs | 210 ++++++++++++++++++ 4 files changed, 215 insertions(+), 5 deletions(-) create mode 100644 crates/pecos-engines/tests/seed_report.rs diff --git a/Cargo.lock b/Cargo.lock index 35b698e71..49fd09d04 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3970,6 +3970,7 @@ dependencies = [ "rayon", "serde", "serde_json", + "tempfile", ] [[package]] diff --git a/crates/pecos-engines/Cargo.toml b/crates/pecos-engines/Cargo.toml index 2793a7d11..1b1e8ec07 100644 --- a/crates/pecos-engines/Cargo.toml +++ b/crates/pecos-engines/Cargo.toml @@ -30,5 +30,8 @@ pecos-core.workspace = true pecos-simulators.workspace = true pecos-random.workspace = true +[dev-dependencies] +tempfile = "3" + [lints] workspace = true diff --git a/crates/pecos-engines/src/monte_carlo/engine.rs b/crates/pecos-engines/src/monte_carlo/engine.rs index 0f4d7474e..079242c17 100644 --- a/crates/pecos-engines/src/monte_carlo/engine.rs +++ b/crates/pecos-engines/src/monte_carlo/engine.rs @@ -457,13 +457,9 @@ impl MonteCarloEngine { pub fn rerun_from_seed_report( &mut self, - seed_report_filename: &str, + seed_report: &SeedReport, ) -> Result { - // Import seed report from user's file. - let seed_report = SeedReport::from_json_file(Path::new(seed_report_filename))?; - debug!("SeedReport successfully imported!"); - // Import shot count, worker count, and all seeds from seed report. let num_shots = seed_report.num_shots; let num_workers = seed_report.num_workers; diff --git a/crates/pecos-engines/tests/seed_report.rs b/crates/pecos-engines/tests/seed_report.rs new file mode 100644 index 000000000..5a49600a7 --- /dev/null +++ b/crates/pecos-engines/tests/seed_report.rs @@ -0,0 +1,210 @@ +use pecos_engines::monte_carlo::engine::{MonteCarloEngine,SeedReport}; +use pecos_engines::monte_carlo::engine::ExternalClassicalEngine; +//use super::builder::MonteCarloEngineBuilder; + +/// Tests that importing a valid SeedReport from JSON file works correctly. +#[test] +fn seed_report_from_json_file_reads_valid_report() { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("seed_report.json"); + + std::fs::write( + &path, + r#" + { + "root_seed": 42, + "base_seed": 123456789, + "num_shots": 10, + "num_workers": 2, + "workers": [ + { "worker_idx": 0, "shots": 5, "seed": 111 }, + { "worker_idx": 1, "shots": 5, "seed": 222 } + ] + } + "#, + ) + .unwrap(); + + let report = SeedReport::from_json_file(&path).unwrap(); + + assert_eq!(report.root_seed, 42); + assert_eq!(report.num_workers, 2); + assert_eq!(report.workers.len(), 2); +} + +/// Tests that importing a missing SeedReport JSON file fails as expected. +#[test] +fn seed_report_from_json_file_returns_error_for_missing_file() { + let err = SeedReport::from_json_file("does-not-exist-seed-report.json").unwrap_err(); + + let msg = format!("{err}"); + assert!(msg.contains("Failed to read seed report JSON")); +} + +/// Verifies that a valid JSON seed report is deserialized with all worker data intact. +#[test] +fn seed_report_from_json_str_parses_valid_report() { + let json = r#" + { + "root_seed": 42, + "base_seed": 123456789, + "num_shots": 10, + "num_workers": 2, + "workers": [ + { "worker_idx": 0, "shots": 5, "seed": 6 }, + { "worker_idx": 1, "shots": 7, "seed": 435 } + ] + } + "#; + let report = SeedReport::from_json_str(json).unwrap(); + assert_eq!(report.root_seed, 42); + assert_eq!(report.base_seed, 123456789); + assert_eq!(report.num_shots, 10); + assert_eq!(report.num_workers, 2); + assert_eq!(report.workers.len(), 2); + assert_eq!(report.workers[0].worker_idx, 0); + assert_eq!(report.workers[0].shots, 5); + assert_eq!(report.workers[0].seed, 6); + assert_eq!(report.workers[1].worker_idx, 1); + assert_eq!(report.workers[1].shots, 7); + assert_eq!(report.workers[1].seed, 435); +} + +/// Tests run_with_workers_seed_report method. +/// Ensures the method kicks the job off correctly and creates a +/// SeedReport with the right properties. +#[test] +fn run_with_seed_report_returns_expected_worker_metadata() { + + fn make_test_monte_carlo_engine() -> MonteCarloEngine { + MonteCarloEngine::new_with_defaults(Box::new( + ExternalClassicalEngine::new(), + )) + } + + let mut engine = make_test_monte_carlo_engine(); + engine.set_seed(42); + + let num_shots = 10; + let num_workers = 2; + + let (_shots, report) = engine + .run_with_workers_seed_report(num_shots, num_workers, false) + .unwrap(); + + assert_eq!(report.root_seed, 42); + assert_eq!(report.num_shots, 10); + assert_eq!(report.num_workers, 2); + assert_eq!(report.workers.len(), 2); + + let total_worker_shots: usize = report.workers.iter().map(|w| w.shots).sum(); + assert_eq!(total_worker_shots, num_shots); + + assert_eq!(report.workers[0].worker_idx, 0); + assert_eq!(report.workers[1].worker_idx, 1); +} + +/// Tests seed determinism. +/// The two runs with the same seed ('a' and 'b') should agree. +/// The run with a different seed ('c') should disagree with the others. +#[test] +fn run_with_seed_report_is_deterministic_for_same_seed_workers_and_shots() { + + fn make_test_monte_carlo_engine() -> MonteCarloEngine { + MonteCarloEngine::new_with_defaults(Box::new( + ExternalClassicalEngine::new(), + )) + } + + let mut engine_a = make_test_monte_carlo_engine(); + let mut engine_b = make_test_monte_carlo_engine(); + let mut engine_c = make_test_monte_carlo_engine(); + + engine_a.set_seed(42); + engine_b.set_seed(42); + engine_c.set_seed(43); + + let (_shots_a, report_a) = engine_a + .run_with_workers_seed_report(10, 2, false) + .unwrap(); + + let (_shots_b, report_b) = engine_b + .run_with_workers_seed_report(10, 2, false) + .unwrap(); + + let (_shots_c, report_c) = engine_c + .run_with_workers_seed_report(10, 2, false) + .unwrap(); + + assert_eq!(report_a.root_seed, report_b.root_seed); + assert_eq!(report_a.base_seed, report_b.base_seed); + assert_eq!(report_a.workers.len(), report_b.workers.len()); + + let seeds_a: Vec = report_a.workers.iter().map(|w| w.seed).collect(); + let seeds_c: Vec = report_c.workers.iter().map(|w| w.seed).collect(); + + assert_ne!(seeds_a,seeds_c); + + for (worker_a, worker_b) in report_a.workers.iter().zip(report_b.workers.iter()) { + assert_eq!(worker_a.worker_idx, worker_b.worker_idx); + assert_eq!(worker_a.shots, worker_b.shots); + assert_eq!(worker_a.seed, worker_b.seed); + } +} + +/// Tests that rerunning a job from the seed report produces +/// the same results as the original job. +#[test] +fn rerun_from_seed_report_reproduces_original_results() { + + fn make_test_monte_carlo_engine() -> MonteCarloEngine { + MonteCarloEngine::new_with_defaults(Box::new( + ExternalClassicalEngine::new(), + )) + } + + let mut original_engine = make_test_monte_carlo_engine(); + original_engine.set_seed(42); + + let (original_results, report) = original_engine + .run_with_workers_seed_report(20, 2, false) + .unwrap(); + + let mut replay_engine = make_test_monte_carlo_engine(); + + let replayed_results = replay_engine + .rerun_from_seed_report(&report) + .unwrap(); + + assert_eq!(replayed_results, original_results); +} + +/// Tests that rerunning a job from a saved string seed report +/// produces the same results as the original job. +#[test] +fn rerun_from_seed_report_loaded_from_json_reproduces_original_results() { + + fn make_test_monte_carlo_engine() -> MonteCarloEngine { + MonteCarloEngine::new_with_defaults(Box::new( + ExternalClassicalEngine::new(), + )) + } + + let mut original_engine = make_test_monte_carlo_engine(); + original_engine.set_seed(42); + + let (original_results, report) = original_engine + .run_with_workers_seed_report(20, 2, false) + .unwrap(); + + let json = serde_json::to_string(&report).unwrap(); + let loaded_report = SeedReport::from_json_str(&json).unwrap(); + + let mut replay_engine = make_test_monte_carlo_engine(); + + let replayed_results = replay_engine + .rerun_from_seed_report(&loaded_report) + .unwrap(); + + assert_eq!(replayed_results, original_results); +} \ No newline at end of file From c950c10c24ad3ffb361a0f4f42706d255742de68 Mon Sep 17 00:00:00 2001 From: drewconnelly-qntm Date: Mon, 27 Jul 2026 13:38:55 -0600 Subject: [PATCH 3/8] removed stray comment --- crates/pecos-engines/tests/seed_report.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/pecos-engines/tests/seed_report.rs b/crates/pecos-engines/tests/seed_report.rs index 5a49600a7..e2083ba62 100644 --- a/crates/pecos-engines/tests/seed_report.rs +++ b/crates/pecos-engines/tests/seed_report.rs @@ -1,6 +1,5 @@ use pecos_engines::monte_carlo::engine::{MonteCarloEngine,SeedReport}; use pecos_engines::monte_carlo::engine::ExternalClassicalEngine; -//use super::builder::MonteCarloEngineBuilder; /// Tests that importing a valid SeedReport from JSON file works correctly. #[test] From fb97778ebb3a8e26d1c340bd071862c3adc313d5 Mon Sep 17 00:00:00 2001 From: drewconnelly-qntm Date: Mon, 27 Jul 2026 16:15:00 -0600 Subject: [PATCH 4/8] trailing whitespace removed It was annoying the lint checker. --- crates/pecos-engines/src/monte_carlo/engine.rs | 2 +- crates/pecos-engines/tests/seed_report.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/pecos-engines/src/monte_carlo/engine.rs b/crates/pecos-engines/src/monte_carlo/engine.rs index 079242c17..bdb1e2bd3 100644 --- a/crates/pecos-engines/src/monte_carlo/engine.rs +++ b/crates/pecos-engines/src/monte_carlo/engine.rs @@ -431,7 +431,7 @@ impl MonteCarloEngine { let combined_results = ShotVec::from_measurements(&shot_results); debug!("Monte Carlo simulation completed successfully"); - + if save_seed_report { Self::save_seed_report_json(&seed_report, "seed_report.json")?; debug!("Seed report successfully saved!"); diff --git a/crates/pecos-engines/tests/seed_report.rs b/crates/pecos-engines/tests/seed_report.rs index e2083ba62..07e59eb9a 100644 --- a/crates/pecos-engines/tests/seed_report.rs +++ b/crates/pecos-engines/tests/seed_report.rs @@ -70,7 +70,7 @@ fn seed_report_from_json_str_parses_valid_report() { } /// Tests run_with_workers_seed_report method. -/// Ensures the method kicks the job off correctly and creates a +/// Ensures the method kicks the job off correctly and creates a /// SeedReport with the right properties. #[test] fn run_with_seed_report_returns_expected_worker_metadata() { @@ -142,7 +142,7 @@ fn run_with_seed_report_is_deterministic_for_same_seed_workers_and_shots() { let seeds_a: Vec = report_a.workers.iter().map(|w| w.seed).collect(); let seeds_c: Vec = report_c.workers.iter().map(|w| w.seed).collect(); - assert_ne!(seeds_a,seeds_c); + assert_ne!(seeds_a,seeds_c); for (worker_a, worker_b) in report_a.workers.iter().zip(report_b.workers.iter()) { assert_eq!(worker_a.worker_idx, worker_b.worker_idx); From e77b2cee320c2d514231707e5526133d959ef714 Mon Sep 17 00:00:00 2001 From: drewconnelly-qntm Date: Tue, 28 Jul 2026 06:55:24 -0600 Subject: [PATCH 5/8] fixed style issues --- .../pecos-engines/src/monte_carlo/engine.rs | 24 ++++----- crates/pecos-engines/tests/seed_report.rs | 50 ++++++------------- 2 files changed, 27 insertions(+), 47 deletions(-) diff --git a/crates/pecos-engines/src/monte_carlo/engine.rs b/crates/pecos-engines/src/monte_carlo/engine.rs index bdb1e2bd3..a349bb5a8 100644 --- a/crates/pecos-engines/src/monte_carlo/engine.rs +++ b/crates/pecos-engines/src/monte_carlo/engine.rs @@ -271,7 +271,11 @@ impl MonteCarloEngine { /// # Panics /// - If `num_shots` is zero. /// - If `num_workers` is zero. - pub fn run_with_workers(&mut self, num_shots: usize, num_workers: usize) -> Result { + pub fn run_with_workers( + &mut self, + num_shots: usize, + num_workers: usize, + ) -> Result { let (shots, _) = self.run_with_workers_seed_report(num_shots, num_workers, false)?; Ok(shots) } @@ -448,18 +452,16 @@ impl MonteCarloEngine { seed_report: &SeedReport, filename: &str, ) -> Result<(), PecosError> { - let json = serde_json::to_vec(seed_report).map_err(|e| { - PecosError::Processing(format!("Failed to serialize seed report: {e}")) - })?; + let json = serde_json::to_vec(seed_report) + .map_err(|e| PecosError::Processing(format!("Failed to serialize seed report: {e}")))?; std::fs::write(filename, json)?; Ok(()) } - pub fn rerun_from_seed_report( + pub fn rerun_from_seed_report( &mut self, seed_report: &SeedReport, ) -> Result { - // Import shot count, worker count, and all seeds from seed report. let num_shots = seed_report.num_shots; let num_workers = seed_report.num_workers; @@ -846,9 +848,8 @@ impl SeedReport { /// Returns `PecosError::Input` when the JSON is malformed or does not match /// the expected seed report schema. pub fn from_json_str(json: &str) -> Result { - serde_json::from_str(json).map_err(|err| { - PecosError::Input(format!("Failed to parse seed report JSON: {err}")) - }) + serde_json::from_str(json) + .map_err(|err| PecosError::Input(format!("Failed to parse seed report JSON: {err}"))) } /// Reads and deserializes a `SeedReport` from a JSON file. @@ -856,9 +857,8 @@ impl SeedReport { /// Returns `PecosError::Input` when the file cannot be read or the file /// contents cannot be parsed as a seed report. pub fn from_json_file>(path: P) -> Result { - let json = fs::read_to_string(path).map_err(|err| { - PecosError::Input(format!("Failed to read seed report JSON: {err}")) - })?; + let json = fs::read_to_string(path) + .map_err(|err| PecosError::Input(format!("Failed to read seed report JSON: {err}")))?; Self::from_json_str(&json) } } diff --git a/crates/pecos-engines/tests/seed_report.rs b/crates/pecos-engines/tests/seed_report.rs index 07e59eb9a..99f3c2a9b 100644 --- a/crates/pecos-engines/tests/seed_report.rs +++ b/crates/pecos-engines/tests/seed_report.rs @@ -1,7 +1,7 @@ -use pecos_engines::monte_carlo::engine::{MonteCarloEngine,SeedReport}; use pecos_engines::monte_carlo::engine::ExternalClassicalEngine; +use pecos_engines::monte_carlo::engine::{MonteCarloEngine, SeedReport}; -/// Tests that importing a valid SeedReport from JSON file works correctly. +/// Tests that importing a valid `SeedReport` from JSON file works correctly. #[test] fn seed_report_from_json_file_reads_valid_report() { let dir = tempfile::tempdir().unwrap(); @@ -31,7 +31,7 @@ fn seed_report_from_json_file_reads_valid_report() { assert_eq!(report.workers.len(), 2); } -/// Tests that importing a missing SeedReport JSON file fails as expected. +/// Tests that importing a missing `SeedReport` JSON file fails as expected. #[test] fn seed_report_from_json_file_returns_error_for_missing_file() { let err = SeedReport::from_json_file("does-not-exist-seed-report.json").unwrap_err(); @@ -69,16 +69,13 @@ fn seed_report_from_json_str_parses_valid_report() { assert_eq!(report.workers[1].seed, 435); } -/// Tests run_with_workers_seed_report method. +/// Tests `run_with_workers_seed_report` method. /// Ensures the method kicks the job off correctly and creates a -/// SeedReport with the right properties. +/// `SeedReport` with the right properties. #[test] fn run_with_seed_report_returns_expected_worker_metadata() { - fn make_test_monte_carlo_engine() -> MonteCarloEngine { - MonteCarloEngine::new_with_defaults(Box::new( - ExternalClassicalEngine::new(), - )) + MonteCarloEngine::new_with_defaults(Box::new(ExternalClassicalEngine::new())) } let mut engine = make_test_monte_carlo_engine(); @@ -108,11 +105,8 @@ fn run_with_seed_report_returns_expected_worker_metadata() { /// The run with a different seed ('c') should disagree with the others. #[test] fn run_with_seed_report_is_deterministic_for_same_seed_workers_and_shots() { - fn make_test_monte_carlo_engine() -> MonteCarloEngine { - MonteCarloEngine::new_with_defaults(Box::new( - ExternalClassicalEngine::new(), - )) + MonteCarloEngine::new_with_defaults(Box::new(ExternalClassicalEngine::new())) } let mut engine_a = make_test_monte_carlo_engine(); @@ -123,17 +117,11 @@ fn run_with_seed_report_is_deterministic_for_same_seed_workers_and_shots() { engine_b.set_seed(42); engine_c.set_seed(43); - let (_shots_a, report_a) = engine_a - .run_with_workers_seed_report(10, 2, false) - .unwrap(); + let (_shots_a, report_a) = engine_a.run_with_workers_seed_report(10, 2, false).unwrap(); - let (_shots_b, report_b) = engine_b - .run_with_workers_seed_report(10, 2, false) - .unwrap(); + let (_shots_b, report_b) = engine_b.run_with_workers_seed_report(10, 2, false).unwrap(); - let (_shots_c, report_c) = engine_c - .run_with_workers_seed_report(10, 2, false) - .unwrap(); + let (_shots_c, report_c) = engine_c.run_with_workers_seed_report(10, 2, false).unwrap(); assert_eq!(report_a.root_seed, report_b.root_seed); assert_eq!(report_a.base_seed, report_b.base_seed); @@ -142,7 +130,7 @@ fn run_with_seed_report_is_deterministic_for_same_seed_workers_and_shots() { let seeds_a: Vec = report_a.workers.iter().map(|w| w.seed).collect(); let seeds_c: Vec = report_c.workers.iter().map(|w| w.seed).collect(); - assert_ne!(seeds_a,seeds_c); + assert_ne!(seeds_a, seeds_c); for (worker_a, worker_b) in report_a.workers.iter().zip(report_b.workers.iter()) { assert_eq!(worker_a.worker_idx, worker_b.worker_idx); @@ -155,11 +143,8 @@ fn run_with_seed_report_is_deterministic_for_same_seed_workers_and_shots() { /// the same results as the original job. #[test] fn rerun_from_seed_report_reproduces_original_results() { - fn make_test_monte_carlo_engine() -> MonteCarloEngine { - MonteCarloEngine::new_with_defaults(Box::new( - ExternalClassicalEngine::new(), - )) + MonteCarloEngine::new_with_defaults(Box::new(ExternalClassicalEngine::new())) } let mut original_engine = make_test_monte_carlo_engine(); @@ -171,9 +156,7 @@ fn rerun_from_seed_report_reproduces_original_results() { let mut replay_engine = make_test_monte_carlo_engine(); - let replayed_results = replay_engine - .rerun_from_seed_report(&report) - .unwrap(); + let replayed_results = replay_engine.rerun_from_seed_report(&report).unwrap(); assert_eq!(replayed_results, original_results); } @@ -182,11 +165,8 @@ fn rerun_from_seed_report_reproduces_original_results() { /// produces the same results as the original job. #[test] fn rerun_from_seed_report_loaded_from_json_reproduces_original_results() { - fn make_test_monte_carlo_engine() -> MonteCarloEngine { - MonteCarloEngine::new_with_defaults(Box::new( - ExternalClassicalEngine::new(), - )) + MonteCarloEngine::new_with_defaults(Box::new(ExternalClassicalEngine::new())) } let mut original_engine = make_test_monte_carlo_engine(); @@ -206,4 +186,4 @@ fn rerun_from_seed_report_loaded_from_json_reproduces_original_results() { .unwrap(); assert_eq!(replayed_results, original_results); -} \ No newline at end of file +} From c0c073f0aa71c295327f3948527296e957a7d3a3 Mon Sep 17 00:00:00 2001 From: drewconnelly-qntm Date: Tue, 28 Jul 2026 07:52:59 -0600 Subject: [PATCH 6/8] additional docstring fix --- .../pecos-engines/src/monte_carlo/engine.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/crates/pecos-engines/src/monte_carlo/engine.rs b/crates/pecos-engines/src/monte_carlo/engine.rs index a349bb5a8..fb8cf0f62 100644 --- a/crates/pecos-engines/src/monte_carlo/engine.rs +++ b/crates/pecos-engines/src/monte_carlo/engine.rs @@ -458,6 +458,17 @@ impl MonteCarloEngine { Ok(()) } + /// Replays a Monte Carlo simulation using the worker configuration and seeds + /// recorded in `seed_report`. + /// + /// The returned shots are ordered deterministically by worker and shot index. + /// + /// # Errors + /// Returns a `PecosError` if the worker pool cannot be created or any shot fails. + /// + /// # Panics + /// Panics if the report specifies zero shots or workers, or does not contain a + /// seed record for every worker. pub fn rerun_from_seed_report( &mut self, seed_report: &SeedReport, @@ -845,6 +856,10 @@ pub struct SeedReport { impl SeedReport { /// Deserializes a `SeedReport` from a JSON string. /// + /// # Returns + /// `SeedReport` imported from the JSON string. + /// + /// # Errors /// Returns `PecosError::Input` when the JSON is malformed or does not match /// the expected seed report schema. pub fn from_json_str(json: &str) -> Result { @@ -854,6 +869,10 @@ impl SeedReport { /// Reads and deserializes a `SeedReport` from a JSON file. /// + /// # Returns + /// `SeedReport` imported from a JSON file. + /// + /// # Errors /// Returns `PecosError::Input` when the file cannot be read or the file /// contents cannot be parsed as a seed report. pub fn from_json_file>(path: P) -> Result { From 20fe6ecebb4254446d29392efca76a9e48043072 Mon Sep 17 00:00:00 2001 From: drewconnelly-qntm Date: Tue, 28 Jul 2026 09:39:27 -0600 Subject: [PATCH 7/8] final linting problem fixed --- crates/pecos-engines/tests/seed_report.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pecos-engines/tests/seed_report.rs b/crates/pecos-engines/tests/seed_report.rs index 99f3c2a9b..4ab3639f6 100644 --- a/crates/pecos-engines/tests/seed_report.rs +++ b/crates/pecos-engines/tests/seed_report.rs @@ -57,7 +57,7 @@ fn seed_report_from_json_str_parses_valid_report() { "#; let report = SeedReport::from_json_str(json).unwrap(); assert_eq!(report.root_seed, 42); - assert_eq!(report.base_seed, 123456789); + assert_eq!(report.base_seed, 123_456_789); assert_eq!(report.num_shots, 10); assert_eq!(report.num_workers, 2); assert_eq!(report.workers.len(), 2); From f9989c44c7e104f3533fbf2dd73c24468370036f Mon Sep 17 00:00:00 2001 From: Ciaran Ryan-Anderson Date: Fri, 31 Jul 2026 16:08:01 -0600 Subject: [PATCH 8/8] Bump wasmtime to 46.0.2 for RUSTSEC-2026-0222 and RUSTSEC-2026-0223 --- Cargo.lock | 125 ++++++++++++++++++++++++++--------------------------- 1 file changed, 62 insertions(+), 63 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2bb0c798f..2a598e3aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -950,7 +950,7 @@ checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" dependencies = [ "serde", "termcolor", - "unicode-width 0.2.2", + "unicode-width 0.1.14", ] [[package]] @@ -1073,27 +1073,27 @@ dependencies = [ [[package]] name = "cranelift-assembler-x64" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e06aeba2c965fc446d13c56a6ccb2631b78445d7544543dd9a25289977630914" +checksum = "47ca6361f42d0c945fadc1103501e1c07438e034fd5a86896a3074eff3e860bd" dependencies = [ "cranelift-assembler-x64-meta", ] [[package]] name = "cranelift-assembler-x64-meta" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2d2dde4ec1352715595b5cfa6fe2e5b8ebb9da3457b3ee8db0aa2808c069aa" +checksum = "2c1dbc96db7cebf747bd5722d482338a5acff91d6be43b6bec145f9471327ffa" dependencies = [ "cranelift-srcgen", ] [[package]] name = "cranelift-bforest" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4982ef9fa54ec9eee841e891e7ddc5434be1250e88de31572e000c888f30b" +checksum = "353b309eef494e4adb4c6cca76f30ef27daa907534db7d05b5986500f51aa4e1" dependencies = [ "cranelift-entity", "wasmtime-internal-core", @@ -1101,9 +1101,9 @@ dependencies = [ [[package]] name = "cranelift-bitset" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "529143118c4eeb58c39ecb02319557d512be6c61348486422974ab8e3906b8a8" +checksum = "e3cafe127a4c5d9765b1df54052245d2cbaca7238782805bb5ac94986ccdb591" dependencies = [ "serde", "serde_derive", @@ -1112,9 +1112,9 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7780677247ad3577e3a6a3ebf43f39b325a11d6393db72b2c9968a910d4d13d" +checksum = "3964f31c6dc9d21e926ef884d3eec2f1ca83266a233521da4a737143262ceb84" dependencies = [ "bumpalo", "cranelift-assembler-x64", @@ -1143,9 +1143,9 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9645250416cbf92454fe61160e17e026e0ce405906a54500b114f923ddffc9" +checksum = "b2f8b35746603b792e4ae34499a39251f310a06c98d4bc2ca02cf4bd29ce3c84" dependencies = [ "cranelift-assembler-x64-meta", "cranelift-codegen-shared", @@ -1156,24 +1156,24 @@ dependencies = [ [[package]] name = "cranelift-codegen-shared" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20ee8d222ff0fd3681791979afbf88586ac9f49010d3db96b3cbe4c96759aee3" +checksum = "584bd91987927dfe35e79c5d6dd52a117cb64c4fce26df881d02dcc17bd59a8f" [[package]] name = "cranelift-control" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "591abe6f5312bd2c4220f1b3bead56c2ad00257c52668015ba013b85dcf2a17a" +checksum = "af277352af76db01bb42fa4978b672a44406715798edb693cc02e363e12dc505" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5300c49cf940526fe771517b3b3eabd5d0ff164ee61698579cf403fe8d3af3c" +checksum = "42ad4f0c556d3d57580d07477be9e665f4d2a826971a5ab4642ead20a19df443" dependencies = [ "cranelift-bitset", "serde", @@ -1183,9 +1183,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4adbf760207fdbbe130f1191cce01cdef66831a9f648b1f39ff2800d126d45" +checksum = "29d69a6b7d8412c716e8599c7330dfbd122c1bc145f3bda05a9e237fba20419d" dependencies = [ "cranelift-codegen", "hashbrown 0.17.1", @@ -1196,15 +1196,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8315b21ff018226a42a60a4702c2dd75f6447cac26e9bca622e14c22088c2ff5" +checksum = "52fcdcd4a5c7fa8bfea35e72c0979ad5a699c836364870f0a84169d02a085a88" [[package]] name = "cranelift-native" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d506ef23a60715bde451b06620b14402166ded3b648454fccbf04f3e46a4aa70" +checksum = "0fee933cf8ec90e58e68163a02bdb0e4d29f2260a7592b3f09cbba52fcd34d12" dependencies = [ "cranelift-codegen", "libc", @@ -1213,9 +1213,9 @@ dependencies = [ [[package]] name = "cranelift-srcgen" -version = "0.133.1" +version = "0.133.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ed47e602652e3410f9387fc0db70fefadcee4d78a78881421aabcab4e26b89" +checksum = "6bd75e1e2719808c80af27ebe168d2220ec10e519e1d5a52bdbed9bd5cac1a32" [[package]] name = "crc" @@ -1890,7 +1890,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]] @@ -2373,6 +2373,7 @@ dependencies = [ "allocator-api2", "equivalent", "foldhash 0.1.5", + "rayon", ] [[package]] @@ -2392,10 +2393,7 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" dependencies = [ - "allocator-api2", - "equivalent", "foldhash 0.2.0", - "rayon", "serde", "serde_core", ] @@ -2825,6 +2823,7 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", + "rayon", "serde", ] @@ -2955,7 +2954,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi 0.5.2", "libc", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -5450,9 +5449,9 @@ dependencies = [ [[package]] name = "pulley-interpreter" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b92604caae1a1899b6a5b54967289dd538177c626004c91accf9d0ec7e4a12" +checksum = "3683e69168d2e2374cea51a79fce2e9870e7c622366b8bf7af87fb5c2428a2a9" dependencies = [ "cranelift-bitset", "log", @@ -5462,9 +5461,9 @@ dependencies = [ [[package]] name = "pulley-macros" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a7ac85c0bb3fb351f10d531230aaa5e366b46d7c4e5328e5f02801d6dac1165" +checksum = "8ebbd6dada1e3df36ea4a4b8feca2ed230aa92d59e55bf5714eb4286cdd632b0" dependencies = [ "proc-macro2", "quote", @@ -6151,7 +6150,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -6207,7 +6206,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -6298,8 +6297,8 @@ checksum = "4b213df2cbfa5f580ed2c0ac3619eda06692a4ff0211f0aebbb4008eaa9724a6" dependencies = [ "fixedbitset 0.5.7", "foldhash 0.1.5", - "hashbrown 0.17.1", - "indexmap 2.14.0", + "hashbrown 0.15.5", + "indexmap 1.9.3", "ndarray 0.17.2", "num-traits", "petgraph 0.8.3", @@ -7005,10 +7004,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.4.3", + "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.61.2", + "windows-sys 0.52.0", ] [[package]] @@ -7958,9 +7957,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4213d2f019a5e44aa8a61d8826dd33a505bff79f749b14a8bafd67321cb9351" +checksum = "ed27b4a4a5271d2608406a99c8d1cf8aea1e894fe4ec361d470063bcf342f1d7" dependencies = [ "addr2line 0.26.1", "async-trait", @@ -7997,9 +7996,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d45863de41977ec6453e859cf843d456fa3fcb45a659b66d16e794f90ec4f5b7" +checksum = "7712f99b0920d4638023405eb9723ef200efd6d39bfc7466c92e926ca5d130f0" dependencies = [ "anyhow", "cpp_demangle", @@ -8028,15 +8027,15 @@ dependencies = [ [[package]] name = "wasmtime-internal-component-util" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819ad5abd5822a22dbf4014475cdfd1fe790707761cd732d74aaa3ba4d5ba489" +checksum = "c777c83bb4c3414b23fe84fecd47a46016a0a0b0a39aa786cad0a701fe3cbc7f" [[package]] name = "wasmtime-internal-core" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fc28372e36eaf8cf70faa83b5779137f7e99c8d18569a125d1580e735cc9e4d" +checksum = "ffb54b5de8723a9acf2c0bc531df8e773462796a5f87e8f49a3d5ea5c3b32ef7" dependencies = [ "hashbrown 0.17.1", "libm", @@ -8045,9 +8044,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-cranelift" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a433efc6e35112a5457e1dc8bc4d8d39820ac7722267e89bc04e5df641f32124" +checksum = "9c60bb70116a88791ccceef605b31010c4888a7305e450f01dc7d4f430ad25f0" dependencies = [ "cfg-if", "cranelift-codegen", @@ -8072,9 +8071,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-fiber" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a1d3a39d0d210f6b8574ee96a4315e0a14c67f3a1fc3cd5372cb10d2fb4422" +checksum = "24bdf54907e0bad31ad6676d03ed1008fa21489725635136f9c38979c39a98ed" dependencies = [ "cc", "cfg-if", @@ -8087,9 +8086,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-jit-debug" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f667288cb4dfa68a4639ffac4d5628535dda64ebdc2b990526efb12b30ba803" +checksum = "ef4edaf07e20511f3ca070a4a0f026c407969f09e536075729872f548ca6f8d4" dependencies = [ "cc", "wasmtime-internal-versioned-export-macros", @@ -8097,9 +8096,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-jit-icache-coherence" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba651d44ab0faad4c58106b3adb45068189fb65ef50f0c404b6d9e3bf81a357" +checksum = "f96a6d7eb246d1306b7db8915a169cd8628a9e6b8299d1d1f8ab109801ef0a66" dependencies = [ "cfg-if", "libc", @@ -8109,9 +8108,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-unwinder" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ecc52563b0558af2a7487eb710de07cc4532564b55528876129238e83118cb1" +checksum = "39472572ea3eb11b7cc7fe7bd6df0005cef87b580eb06a3378d103ac99d45bc3" dependencies = [ "cfg-if", "cranelift-codegen", @@ -8122,9 +8121,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-versioned-export-macros" -version = "46.0.1" +version = "46.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e747f4a074699ba1b4e4d841fb263f9b7df5bd1555181c4752bf5990d21ba676" +checksum = "7bf2eff1c108b01566a7c8870de34821e7bda7d327e86e12a548c026e1e3677d" dependencies = [ "proc-macro2", "quote", @@ -8400,7 +8399,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.48.0", ] [[package]]