Firefly MLS is an open-source suite of client-side libraries for end-to-end encrypted messaging, group management, and key state persistence using the Message Layer Security (MLS) protocol (RFC 9420).
This repository contains the client-side crates and language bindings:
crates/core(firefly-core): Core MLS protocol rules, custom proposals, identity provider implementation, and group extension handlers.crates/protos(firefly-protos): Protocol buffer definitions for wire messages, group structures, and user payloads.crates/client(firefly-client): High-level async client engine managing WebSocket connectivity, local SQLite persistence (for messages, group state, and key material), address rotation, and group management.crates/client-node(firefly-client-node): Node.js / TypeScript native N-API bindings forfirefly-client.crates/firefly-client-js(firefly-client-js): Web / JS bindings for client integration.
- Rust toolchain (edition 2024 / 1.85+)
- Node.js & pnpm (optional, for Node.js client bindings)
To verify and compile all workspace crates:
cargo checkTo build release artifacts:
cargo build --releaseAll client-side unit tests, cryptographic rules, SQLite stores, cursor advances, and key material storage providers run in-memory and require no running external dependencies:
cargo test --libcargo testClient integration tests can be executed against a running Firefly MLS server instance:
- Start the backend PostgreSQL database and server in the
firefly-mlsrepository:cd ../firefly-mls docker compose up -d cargo run -p firefly-server - Run client integration tests pointing to the test server:
FIREFLY_BASE_URL=http://127.0.0.1:39205 FIREFLY_WS_URL=ws://127.0.0.1:39205/ RUST_LOG=info cargo test --features firefly-client/test-hookstest-hookscompiles in the test-only environment overrides (FIREFLY_WT_CERT_SHA256,FIREFLY_WT_INSECURE,WT_HOST) so tests can trust a local server's certificate. Apps never enable it, so release builds always verify WebTransport certificates.
If FIREFLY_BASE_URL is not specified, server integration tests skip gracefully so offline CI/CD pipelines run standard unit tests quickly.
MIT