offline-protocol 0.30.0

Main protocol engine for the Offline Protocol SDK
Documentation

offline-protocol

Main protocol engine of the Offline Protocol SDK: an offline-first messaging protocol with intelligent multi-transport switching, mesh networking, and automatic end-to-end encryption.

This is the crate to depend on if you are consuming the SDK from Rust — it re-exports and orchestrates the lower layers (core types, transports, routing, reliability, MLS encryption, mesh services) behind one engine.

Features

  • Multi-transport: automatically switches between BLE, WiFi Direct, Internet, Reticulum, and Nostr relays via DORS (Dynamic Offline Relay Switch)
  • Mesh networking: peer discovery, cluster formation, and bounded multi-hop message relay
  • End-to-end encryption: automatic MLS (RFC 9420) for direct messages and groups, fail-closed by default
  • Reliability: delivery ACKs, retries with exponential backoff, and deduplication built in
  • Event-driven: the engine surfaces MessageReceived, NeighborDiscovered, TransportSwitched, and the rest of its lifecycle through an event callback

What you must implement

The Rust crates are I/O-free protocol engines — they queue, route, encrypt, and select transports, but never open a socket or touch a radio. A platform bridge does the actual I/O: it drains each transport's outbound queue, performs the send, reports the outcome, and injects inbound bytes. If you consume this crate directly, you write that bridge yourself; the contract is documented in the offline-protocol-transport crate docs.

Ready-made bridges ship with the higher-level bindings instead:

Documentation

License

Copyright © 2025-2026 Offline Protocol, Inc.

Dual-licensed: AGPL-3.0-only for open-source use, or a commercial license for proprietary use. You may use the SDK under either license; you do not need both.