LibXMTP is a shared library encapsulating the core functionality of the XMTP messaging protocol, such as cryptography, networking, and language bindings.
Start Docker Desktop.
-
To install other dependencies and start background services:
dev/up
Specifically, this command creates and runs an XMTP node in Docker Desktop.
-
To run tests:
dev/test
-
To run WebAssembly tests headless:
dev/test-wasm
-
To run WebAssembly tests interactively for a package, for example,
xmtp_mls
:dev/test-wasm-interactive xmtp_mls
This project supports containerized development. From Visual Studio Code Dev Containers extension specify the Dockerfile as the target:
Reopen in Container
or
Command line build using docker
docker build . -t libxmtp:1
libxmtp/
├ bindings_ffi
: FFI bindings for Android and iOS (in
progress)
├ bindings_wasm
: Wasm bindings (in progress)
├ examples/
│ ├ android/xmtpv3_example
: Example
Android app (in progress)
│ └ cli
: Example XMTP console client. Use the CLI to try out
sending double ratchet messages on the XMTP dev
network.
├ xmtp_api_grpc
: API client for XMTP's gRPC API, using code
from xmtp_proto
├ xmtp_api_http
: API client for XMTP's gRPC Gateway API,
using code from xmtp_proto
├ xmtp_cryptography
: Cryptographic operations
├ xmtp_mls
: Version 3 of XMTP which implements
Messaging Layer Security.
├ xmtp_proto
: Generated code for handling XMTP protocol
buffers
possible benchmarks include:
group_limit
: benchmarks surrounding maximum members adding/removed from groupcrypto
: benchmarks surrounding cryptographic functions
Example Commands
- Run a specific category of benchmark
cargo bench --features bench -p xmtp_mls --bench group_limit
- Run against dev grpc DEV_GRPC=1 cargo bench --features bench -p xmtp_mls --bench group_limit
- Just run all benchmarks ./dev/bench
- Run one specific benchmark ./dev/bench add_1_member_to_group
- Generate flamegraph from one benchmark ./dev/flamegraph add_1_member_to_group