Skip to main content

moonpool_sim/sim/
mod.rs

1//! Core simulation engine for deterministic testing.
2//!
3//! This module provides the central SimWorld coordinator that manages time,
4//! event processing, and network simulation state.
5//!
6//! ## Submodules
7//!
8//! - `world` - Core SimWorld and WeakSimWorld types
9//! - `events` - Event types and queue for scheduling
10//! - `state` - Network and storage state management
11//! - `wakers` - Waker management for async coordination
12//! - `sleep` - Sleep future for simulation time
13//! - `rng` - Thread-local random number generation
14
15pub mod events;
16pub mod rng;
17pub mod sleep;
18pub mod state;
19pub mod storage_ops;
20pub mod wakers;
21pub mod world;
22
23// Re-export main types at module level
24pub use events::{
25    ConnectionStateChange, Event, EventQueue, NetworkOperation, ScheduledEvent, StorageOperation,
26};
27pub use rng::{
28    clear_rng_breakpoints, get_current_sim_seed, get_rng_call_count, reset_rng_call_count,
29    reset_sim_rng, set_rng_breakpoints, set_sim_seed, sim_random, sim_random_f64, sim_random_range,
30    sim_random_range_or_default,
31};
32pub use sleep::SleepFuture;
33pub use state::{FileId, PendingOpType, PendingStorageOp, StorageFileState, StorageState};
34pub use world::{SimWorld, WeakSimWorld};