# Rust SDK The Rust client is the reference implementation, located in `crates/quicprochat-client/`. ## Installation Add to your `Cargo.toml`: ```toml [dependencies] quicprochat-client = { path = "crates/quicprochat-client" } ``` ## Connection The Rust client connects directly over QUIC with Cap'n Proto RPC: ```rust use quicprochat_client::{cmd_health, cmd_login, cmd_send, connect_node}; // Health check cmd_health("127.0.0.1:5001", &ca_cert_path, "localhost").await?; // Login via OPAQUE cmd_login( "127.0.0.1:5001", &ca_cert_path, "localhost", "alice", "password123", None, // identity_key_hex Some(&state_path), // state persistence None, // state_password ).await?; ``` ## Key Features - Full MLS (RFC 9420) group encryption - Hybrid post-quantum KEM (X25519 + ML-KEM-768) - OPAQUE authentication with zeroizing credential storage - SQLCipher local state with Argon2id key derivation - Sealed sender metadata protection - v2 QUIC + Protobuf transport (via `quicprochat-sdk` crate) ## v2 SDK Crate The `quicprochat-sdk` crate provides the higher-level v2 API: ```rust use quicprochat_sdk::QpqClient; let client = QpqClient::connect("127.0.0.1:5001", &tls_config).await?; let health = client.health().await?; ``` ## Crate Structure | Crate | Purpose | |---|---| | `quicprochat-core` | Crypto primitives, MLS, hybrid KEM | | `quicprochat-proto` | Protobuf + Cap'n Proto generated types | | `quicprochat-rpc` | QUIC RPC framework (framing, dispatch) | | `quicprochat-sdk` | High-level client SDK | | `quicprochat-client` | CLI/TUI client application | | `quicprochat-ffi` | C FFI bindings |