nxtquic-sim
Deterministic network simulator for NxtQuic testing.
nxtquic-sim is a virtual network environment for the NxtQuic workspace. It allows you to run QUIC endpoints inside a fully controllable, deterministic simulation — without any real OS networking — making it ideal for unit tests, system tests, and reproducing network edge cases reliably.
Features
- Deterministic execution — controllable virtual time; replay any scenario bit-for-bit
- Configurable link impairment — inject latency, packet loss, duplication, and bit corruption
- Multi-node topologies — model complex networks with multiple endpoints and routers
- Mobile handoff simulation — reproduce path migration, failover, and multipath scenarios
- I/O-free — runs on top of
nxtquic-protowith no OS socket involvement - No async runtime required — synchronous simulation loop, zero flakiness
Usage
[]
= "0.1.2"
use ;
let mut sim = new;
let link = sim.add_link;
// Feed packets and advance virtual time
sim.step;
Part of the NxtQuic workspace
| Crate | Purpose |
|---|---|
nxtquic |
Top-level re-export, async API |
nxtquic-proto |
Core state machine |
nxtquic-crypto |
Pluggable crypto backends |
nxtquic-udp |
Platform-optimized UDP I/O |
nxtquic-api |
Tokio async/await API |
nxtquic-h3 |
HTTP/3 + QPACK |
nxtquic-sim |
Deterministic network simulator (this crate) |
nxtquic-qlog |
qlog structured logging |
License
Licensed under either of MIT or Apache-2.0 at your option.