Skip to content
/ libxmtp Public

LibXMTP is a shared library encapsulating the core functionality of the XMTP messaging protocol, such as cryptography, networking, and language bindings.

License

Notifications You must be signed in to change notification settings

xmtp/libxmtp

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

55733c8 · Dec 19, 2024
Dec 16, 2024
Nov 14, 2023
Dec 16, 2024
Oct 25, 2024
Dec 19, 2024
Dec 18, 2024
Dec 18, 2024
Dec 17, 2024
Dec 16, 2024
Nov 15, 2024
Dec 17, 2024
Nov 9, 2023
Dec 12, 2024
Dec 19, 2024
Dec 12, 2024
Dec 19, 2024
Dec 2, 2024
Dec 16, 2024
Dec 12, 2024
Dec 19, 2024
Dec 13, 2024
Nov 4, 2024
Dec 10, 2024
Nov 4, 2024
Aug 22, 2024
Nov 17, 2023
Jan 31, 2024
Oct 3, 2024
Jun 6, 2024
Jan 22, 2024
Dec 19, 2024
Dec 16, 2024
Sep 30, 2024
Oct 27, 2023
Oct 17, 2024
Aug 15, 2023
Nov 21, 2024
Oct 22, 2024
Dec 4, 2024
Dec 4, 2024
Feb 8, 2024

Repository files navigation

LibXMTP

https://github.com/xmtp/libxmtp/actions/workflows/test.yml/badge.svg https://github.com/xmtp/libxmtp/actions/workflows/lint.yml/badge.svg Status

LibXMTP is a shared library encapsulating the core functionality of the XMTP messaging protocol, such as cryptography, networking, and language bindings.

Important This software is in alpha status and ready for you to start experimenting with. However, we do not recommend using alpha software in production apps. Expect frequent changes as we add features and iterate based on feedback.

Requirements

Development

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
    

Quick Start (Dev Containers)

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

Structure

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

xmtp_v2: Version 2 of XMTP which uses a user key bundle to encrypt and exchange messages.

Run the benchmarks

possible benchmarks include:

  • group_limit: benchmarks surrounding maximum members adding/removed from group
  • crypto: 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