hive-mesh
Mesh networking library with CRDT sync, transport security, and topology management.
Overview
hive-mesh provides the core mesh networking layer for the HIVE protocol, including:
- Transport - Pluggable transports (UDP bypass, BLE, HIVE-Lite) with connection health monitoring and reconnection
- Security - Ed25519 identity, X25519 key exchange, ChaCha20-Poly1305 encryption, formation keys
- Discovery - mDNS and static peer discovery with hybrid strategies
- Topology - Dynamic topology management with partition detection and autonomous operation
- Routing - Mesh routing with data aggregation and deduplication
- Storage - Automerge CRDT backend with Iroh P2P sync, negentropy set reconciliation, and redb persistence
- Beacon - Geographic beacon broadcasting and observation with geohash indexing
- QoS - Bandwidth management, TTL, retention policies, sync modes, and garbage collection
- Broker - Optional HTTP/WebSocket service broker (Axum-based)
Installation
[]
= "0.1.0"
Feature flags
| Feature | Description |
|---|---|
automerge-backend |
Automerge CRDT storage with Iroh P2P sync and redb persistence |
bluetooth |
BLE mesh transport via hive-btle |
broker |
HTTP/WebSocket service broker (Axum) |
kubernetes |
Kubernetes peer discovery via EndpointSlice API (guide) |
node |
All-in-one feature for the hive-mesh-node binary (includes broker, kubernetes, automerge-backend) |
lite-transport |
HIVE-Lite UDP transport for embedded devices |
# Example with features
= { = "0.1.0", = ["automerge-backend", "bluetooth"] }
Quick start
use ;
async
Kubernetes Deployment
hive-mesh includes a binary target (hive-mesh-node), Dockerfile, and Helm chart for Kubernetes deployment.
# Build the binary
# Build Docker image
# Deploy to k3d (local Kubernetes)
See the full Deployment Guide for details on configuration, verification, cluster lifecycle, and multi-cluster federation testing.
Development
# Build (default features)
# Build with all optional features
# Run tests
# Clippy
CI
CI runs via GOA (GitOps Agent) on every Radicle patch:
- Format -
cargo fmt --check - Clippy -
cargo clippy -- -D warnings - Tests -
cargo test - Feature builds -
automerge-backend,bluetooth,broker
Results are posted as patch reviews (accept/reject). Community patches require a delegate "ok-to-test" comment before CI runs.
Manual CI
# Run the full CI pipeline locally
Source
License
Apache-2.0