Sittard - A Sans-IO tickless async runtime, fully deterministic.
That's a mouthful, so let's unpack it:
- Async runtime: sittard runs async Rust code, i.e. stuff that implements the
Futuretrait. - Sans-IO: sittard doesn't support asynchronous IO (e.g. network requests, filesystem operations, etc).
- Tickless: sittard allows async code to "sleep", but instead of waiting for the time to elapse, sittard advances its virtual clock whenever necessary.
- Fully deterministic: running the same code under sittard always yields the same results, unless the async code itself is a source of non-determinism.
Example
use Runtime;
use Duration;
// Create a runtime and run a future
let rt = default;
rt.block_on;
The code above completes instantly, even though it "sleeps" for 60 seconds.
Use Cases
Sittard is particularly useful for:
- Creating reproducible simulations that depend on timing, e.g. QUIC network traffic with deep-space delays
- Testing time-dependent code without waiting for real time to pass
Note that sittard is unsuitable for common async scenarios like web servers and clients.