Skip to content

floscodes/xmes

Repository files navigation

xmes

xmes

Decentralised, end-to-end encrypted messaging — built with Rust and XMTP.

status rust wasm


What is xmes?

xmes is an open-source messenger built on the XMTP protocol — a decentralised, blockchain-based messaging standard. Identities are Ethereum keypairs: no central server controls your account or your messages.

The project compiles a single Rust codebase to WebAssembly, targeting web (PWA), desktop, and mobile via Dioxus.


Repository structure

xmes/
├── xmes-xmtp-wasm/   # XMTP integration layer — WASM only, no UI
└── xmes-pwa/         # Dioxus PWA frontend — WebAssembly

xmes-xmtp-wasm

The XMTP integration layer, compiled exclusively to WebAssembly. Wraps the libxmtp WASM bindings and exposes a clean Rust API. Responsibilities:

  • Ethereum keypair generation and identity management
  • Private key serialisation (hex) for local persistence
  • Conversation listing and group creation via XMTP
  • Worker infrastructure — spawns a Dedicated Worker so the XMTP SQLite database can use the OPFS Sync Access Handle VFS (browser main thread restriction workaround)
  • Environment switching (Local / Dev / Production)

xmes-pwa

The Progressive Web App frontend built with Dioxus 0.7, compiled to WebAssembly. A pure UI crate: no JS interop, no wasm-bindgen direct dependency — only Dioxus and xmes-xmtp-wasm.


Getting started

Prerequisites

  • Rust
  • Dioxus CLI: cargo install dioxus-cli
  • wasm32-unknown-unknown target: rustup target add wasm32-unknown-unknown

Development

# Start the dev server (PWA) with hot reload
dx serve --addr 0.0.0.0 --port 9000 --cross-origin-policy

# Build for web
dx build

# Lint (automatically targets WASM via .cargo/config.toml)
cargo clippy

# Format
cargo fmt

--cross-origin-policy sets Cross-Origin-Opener-Policy: same-origin, which is required for the OPFS Sync Access Handle VFS used by the XMTP database in the Dedicated Worker.


Roadmap

  • XMTP identity creation and persistence
  • Conversation list with swipe-to-delete
  • Group creation
  • OPFS-backed persistent MLS state via Dedicated Worker
  • Installable PWA (manifest + service worker)
  • Send and receive messages
  • Push notifications
  • Desktop target (Dioxus desktop renderer)
  • Mobile target (Dioxus mobile renderer)

License

To be determined.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors