Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/openmls/openmls/llms.txt

Use this file to discover all available pages before exploring further.

Prerequisites

OpenMLS requires Rust 1.56 or later. Make sure you have Rust installed:
rustc --version
If you need to install Rust, visit rustup.rs.

Add OpenMLS to your project

Add OpenMLS to your Cargo.toml:
Cargo.toml
[dependencies]
openmls = "0.8.1"

Choose a crypto provider

OpenMLS requires a cryptographic provider. You have several options: The openmls_rust_crypto provider uses pure Rust cryptographic implementations:
Cargo.toml
[dependencies]
openmls = "0.8.1"
openmls_rust_crypto = "0.5"

Option 2: libcrux provider

The libcrux provider offers formally verified cryptographic implementations:
Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["libcrux-provider"] }

Option 3: Custom provider

Implement the provider traits yourself for full control. See Custom implementation for details.

Storage provider

OpenMLS needs a storage backend for key material and group state:

In-memory storage (development)

For testing and development, use the memory storage provider:
Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["test-utils"] }
openmls_memory_storage = "0.5"
In-memory storage is not persistent. Use it only for testing and development.

SQLite storage (production)

For production applications, use the SQLite storage provider:
Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["sqlite-provider"] }

Credentials

For basic credential support, add the basic credential crate:
Cargo.toml
[dependencies]
openmls = "0.8.1"
openmls_basic_credential = "0.5"

Feature flags

OpenMLS provides several optional features:

Production features

Enable features defined in MLS extensions draft-08:
Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["extensions-draft-08"] }
Enable helper functionality for resolving forks in MLS groups:
Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["fork-resolution"] }
See Fork resolution for usage details.
Enable compilation to WebAssembly with JavaScript APIs:
Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["js"] }
This feature is required when building for wasm32-unknown-unknown to access secure randomness and timing APIs.

Development features

Utilities for testing, including in-memory storage:
Cargo.toml
[dev-dependencies]
openmls = { version = "0.8.1", features = ["test-utils"] }
Enable backtrace support for error handling:
Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["backtrace"] }
Allow printing sensitive message content for debugging:
Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["content-debug"] }
Never enable this feature in production. It exposes sensitive message content.
Allow printing cryptographic key material for debugging:
Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["crypto-debug"] }
Never enable this feature in production. It exposes cryptographic secrets.

Complete example configurations

For development and testing

Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["test-utils"] }
openmls_rust_crypto = "0.5"
openmls_basic_credential = "0.5"
openmls_memory_storage = "0.5"

For production

Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["sqlite-provider", "fork-resolution"] }
openmls_rust_crypto = "0.5"
openmls_basic_credential = "0.5"

For WebAssembly

Cargo.toml
[dependencies]
openmls = { version = "0.8.1", features = ["js"] }
openmls_rust_crypto = "0.5"
openmls_basic_credential = "0.5"
openmls_memory_storage = "0.5"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"

Verify installation

Create a simple test to verify your installation:
src/main.rs
use openmls::prelude::*;

fn main() {
    println!("OpenMLS is installed!");
    
    // Test that we can reference the ciphersuite
    let ciphersuite = Ciphersuite::MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519;
    println!("Using ciphersuite: {:?}", ciphersuite);
}
Run your test:
cargo run
You should see:
OpenMLS is installed!
Using ciphersuite: MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519

Next steps

Quickstart

Create your first MLS group with a complete working example