Developers
nym-sdk

nym-sdk

nym-sdk is the Rust SDK for the Nym mixnet. All modules share a common MixnetClient that manages gateway connections, Sphinx encryption, and cover traffic.

┌──────────────────────────────────────────────────────────────┐
│  Your Rust app (alice)                                       │
│       └─ MixnetClient (Sphinx layering, cover traffic)       │
│            └─ WebSocket to entry gateway                     │
│                 └─ Nym mixnet (entry → 3 mix layers → exit)  │
│                      └─ MixnetClient (bob)                   │
│                           └─ Your Rust app (bob)             │
└──────────────────────────────────────────────────────────────┘

Both sides run a MixnetClient. Sphinx encryption protects every hop end-to-end; neither gateway nor any mix node can link sender to receiver.

For an overview of what the SDK can do, see the Tour. For setup instructions, see Installation.

Modules

ModuleWhat it doesStatus
StreamMultiplexed AsyncRead + AsyncWrite byte streams over the Mixnet, the closest analogue to TCP sockets.Recommended
MixnetRaw message payloads, independently routed, no connections or ordering. Full control over the communication model.Stable
Client PoolKeeps ready-to-use MixnetClient instances warm for bursty workloads.Stable
TcpProxyTCP socket proxying with session management and message ordering.Deprecated
FFIGo and C/C++ bindings.Stable
🚫

TcpProxy is deprecated. Use the Stream module for new projects.

Proxy-mode crates

For proxy-mode integrations (reaching third-party services through an Exit Gateway), see also:

  • smolmix: TcpStream and UdpSocket over the Mixnet via a userspace IP stack. Compatible with tokio-rustls, hyper, tokio-tungstenite, and the rest of the async Rust ecosystem.
  • SOCKS Client: SOCKS4/4a/5 proxy via the Exit Gateway's Network Requester. Works with any SOCKS-capable application without code changes.