Deterministic simulation testing for distributed systems in Rust. Write your distributed system once, test it with deterministic simulation and chaos injection, then deploy with real networking — using identical application code.
Inspired by FoundationDB's simulation testing and Antithesis.
Note: This is a hobby-grade project under active development.
moonpool Facade crate, re-exports everything
├── moonpool-transport RPC, peer connections, wire format
│ └── moonpool-transport-derive #[service] proc-macro
├── moonpool-sim Simulation engine, chaos testing, assertions
│ └── moonpool-explorer Fork-based multiverse exploration
└── moonpool-core Provider traits and core types
| Use case | Crate |
|---|---|
| Full framework (recommended) | moonpool |
| Provider traits only | moonpool-core |
| Simulation without transport | moonpool-sim |
| Transport without simulation | moonpool-transport |
| Fork-based exploration internals | moonpool-explorer |
| Proc-macro internals | moonpool-transport-derive |
TimeProvider, NetworkProvider, TaskProvider, RandomProvider, StorageProvider), not concrete implementations. Same code runs in simulation and production.buggify! fires with 25% probability at fault injection points.assert_always!, assert_sometimes!, numeric comparisons, compound assertions). Multi-seed testing runs until all sometimes assertions fire.fork() explores alternate timelines with different RNG seeds. Adaptive energy budgets and coverage bitmaps guide exploration.#[service] macro — Auto-generates RPC server/client boilerplate from a single trait definition.# Enter development environment (Nix required)
nix develop
# Run tests
nix develop --command cargo nextest run
# Build documentation
nix develop --command cargo doc --open
Apache 2.0
$ claude mcp add moonpool \
-- python -m otcore.mcp_server <graph>