New: a threat-model-first guide to choosing your network defence, plus the nym-smoldvpn dVPN package and nym-swizzle sender hygiene.
Developers
Installation

Installation

[dependencies]
nym-sdk = "1.22.1"

Minimum Rust version: 1.87+

From Git

You can also import directly from Git if you want unreleased changes:

# development branch (latest changes, may be unstable)
nym-sdk = { git = "https://github.com/nymtech/nym", branch = "develop" }
 
# latest stable release
nym-sdk = { git = "https://github.com/nymtech/nym", branch = "master" }

Feature flags

Every feature is on by default, so the dependency line above gives you the full SDK. To compile only the parts you use, turn the defaults off and list the features you need:

[dependencies]
nym-sdk = { version = "1.22.1", default-features = false, features = ["stream"] }

The core mixnet client (connecting, sending and receiving messages, Recipient) is always available and needs no feature.

FeatureEnables
fs-storageOn-disk persistent storage for keys, credentials, reply SURBs, and gateways. Pulls in the SQLite (sqlx) stack.
socks5SOCKS5 client mode and network-requester country discovery.
iprIP packet router client and IP-over-mixnet stream. Implies stream.
credentialsPaid ecash bandwidth credentials.
streamBidirectional byte streams (AsyncRead + AsyncWrite) over the mixnet.
tcp-proxyTCP tunnelling over the mixnet. Implies fs-storage and client-pool.
client-poolPre-warmed pool of ephemeral clients.
cliThe nym-proxy-server and nym-proxy-client binaries. Implies tcp-proxy.
💡

The SQLite (sqlx) dependency tree comes only from on-disk storage. An ephemeral client that leaves fs-storage, tcp-proxy, and credentials disabled links none of it. This is the main reason to set default-features = false.