Examples
Runnable examples in sdk/rust/nym-sdk/examples/ (opens in a new tab). Each file is self-contained with step-by-step comments.
cargo run --example <name>| Example | Source | What it demonstrates |
|---|---|---|
| Simple Read/Write | stream_simple_read_write.rs (opens in a new tab) | Multiple concurrent streams, bidirectional communication |
| Idle Timeout | stream_idle_timeout.rs (opens in a new tab) | Configuring with_stream_idle_timeout, observing EOF after cleanup |
| Mode Guard | stream_mode_guard.rs (opens in a new tab) | Mutual exclusion between stream and message modes |
| Throughput | stream_throughput.rs (opens in a new tab) | Sending 1 MB over a single stream, verifying data integrity |