nomad-protocol 0.2.0

NOMAD Protocol - Network-Optimized Mobile Application Datagram. A secure UDP-based state synchronization protocol.
Documentation
[workspace]
members = [".", "examples/echo"]

[package]
name = "nomad-protocol"
description = "NOMAD Protocol - Network-Optimized Mobile Application Datagram. A secure UDP-based state synchronization protocol."
version = "0.2.0"
edition = "2024"
license = "MIT OR Apache-2.0"
repository = "https://github.com/DanEscher98/nomad-rs"
homepage = "https://github.com/DanEscher98/nomad-rs"
documentation = "https://docs.rs/nomad-protocol"
rust-version = "1.85"
authors = ["The NOMAD Protocol Authors"]
keywords = ["protocol", "networking", "mobile", "udp", "sync"]
categories = ["network-programming", "asynchronous", "cryptography"]
readme = "README.md"

[dependencies]
# Error handling
thiserror = "2"

# Transport layer dependencies
tokio = { version = "1", features = ["full"], optional = true }

# Crypto dependencies
snow = { version = "0.9", optional = true }
chacha20poly1305 = { version = "0.10", optional = true }
blake2 = { version = "0.10", optional = true }
sha2 = { version = "0.10", optional = true }
hkdf = { version = "0.12", optional = true }
zeroize = { version = "1", features = ["derive"], optional = true }
rand = { version = "0.8", optional = true }
x25519-dalek = { version = "2", features = ["static_secrets"], optional = true }

# Compression extension
zstd = { version = "0.13", optional = true }

[dev-dependencies]
hex = "0.4"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }

[features]
default = ["transport", "crypto", "sync", "extensions", "client", "server"]

# Transport layer (frames, RTT, pacing, sockets)
transport = ["dep:tokio"]

# Crypto layer (Noise_IK, XChaCha20-Poly1305, anti-replay)
crypto = ["dep:snow", "dep:chacha20poly1305", "dep:blake2", "dep:sha2", "dep:hkdf", "dep:zeroize", "dep:rand", "dep:x25519-dalek"]

# Sync layer
sync = []

# Extensions
extensions = ["dep:zstd"]

# High-level APIs
client = ["transport"]
server = ["transport"]

# All features
full = ["transport", "sync", "crypto", "extensions", "client", "server"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[profile.release]
lto = true
codegen-units = 1

# Echo example is a separate package with additional dependencies
# Build with: cargo build -p nomad-echo
# Or from examples/echo: cargo build