Developers
Examples

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>
ExampleSourceWhat it demonstrates
Simple Read/Writestream_simple_read_write.rs (opens in a new tab)Multiple concurrent streams, bidirectional communication
Idle Timeoutstream_idle_timeout.rs (opens in a new tab)Configuring with_stream_idle_timeout, observing EOF after cleanup
Mode Guardstream_mode_guard.rs (opens in a new tab)Mutual exclusion between stream and message modes
Throughputstream_throughput.rs (opens in a new tab)Sending 1 MB over a single stream, verifying data integrity