README.md

May 27, 2026 · View on GitHub

Turmoil

Add hardship to your tests.

Turmoil is a family of crates for deterministic simulation testing of distributed systems. It runs multiple concurrent hosts within a single thread and injects "hardship" — latency, drops, partitions, crashes, torn writes — into the simulated network and filesystem, under manual control or a seeded RNG.

Build Status Discord chat

Crates

CrateDescription
turmoilFull simulation-testing framework. Start here.Crates.io Documentation
turmoil-netDeterministic simulated socket stack. Drop-in replacement for tokio::net.Crates.io Documentation
turmoil-fsDeterministic simulated filesystem. Drop-in replacement for std::fs / tokio::fs.Crates.io Documentation
turmoil-io-uringDeterministic simulated io_uring. Optional fs feature wires it to turmoil-fs.Crates.io Documentation

Examples

See examples/ for end-to-end samples, and each crate's tests/ directory for smaller, feature-focused tests.

License

This project is licensed under the MIT license.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Turmoil by you, shall be licensed as MIT, without any additional terms or conditions.