I’ve been working on Fracture, a testing framework that brings deterministic chaos engineering to async Rust.
We all know the pain: async code often passes unit test but fails in production due to timeouts, race conditions, or network blips. I built Fracture to reproduce these failures locally and deterministically.
What it does: Fracture is a drop-in replacement for Tokio during testing. It runs your async code in a pure in-memory simulation. This allows it to:
Inject Chaos: simulate packet loss, connection resets, high latency, and task aborts.
Control Time: fast-forward timeouts instantly (no real sleeping).
Guarantee Determinism: It uses a seeded RNG. If a test fails due to a specific sequence of race conditions and network drops, it gives you the seed. You can re-run that seed to trigger the exact same bug again.
How it handles dependencies: One of the hardest parts of testing async Rust is dealing with external crates (like reqwest or sqlx) that depend on the real Tokio runtime. Fracture solves this via a "shim" crate strategy. You can patch tokio in your Cargo.toml to redirect the dependency tree to Fracture’s simulation runtime, meaning you can chaos-test your entire stack without changing your production code.
Current Status: This is an Alpha (v0.1.2) release. The core concepts work, but there are edge cases we haven't found yet.
I’d love for you to try breaking it (and your code).
1 comment
[ 4.3 ms ] story [ 15.1 ms ] threadI’ve been working on Fracture, a testing framework that brings deterministic chaos engineering to async Rust.
We all know the pain: async code often passes unit test but fails in production due to timeouts, race conditions, or network blips. I built Fracture to reproduce these failures locally and deterministically.
What it does: Fracture is a drop-in replacement for Tokio during testing. It runs your async code in a pure in-memory simulation. This allows it to:
Inject Chaos: simulate packet loss, connection resets, high latency, and task aborts.
Control Time: fast-forward timeouts instantly (no real sleeping).
Guarantee Determinism: It uses a seeded RNG. If a test fails due to a specific sequence of race conditions and network drops, it gives you the seed. You can re-run that seed to trigger the exact same bug again.
How it handles dependencies: One of the hardest parts of testing async Rust is dealing with external crates (like reqwest or sqlx) that depend on the real Tokio runtime. Fracture solves this via a "shim" crate strategy. You can patch tokio in your Cargo.toml to redirect the dependency tree to Fracture’s simulation runtime, meaning you can chaos-test your entire stack without changing your production code.
Current Status: This is an Alpha (v0.1.2) release. The core concepts work, but there are edge cases we haven't found yet.
I’d love for you to try breaking it (and your code).