matrix-rust-sdk splits into UI, client and crypto crates, and only three of them are meant for direct use
Matrix Client-Server SDK for Rust
At a glance
- What is it?
- matrix-org/matrix-rust-sdk is the Rust library family behind Element X and other Matrix clients. The choice that matters is which of its crates you depend on, since the workspace holds many more than the README supports.
- Who is it for?
- Choose matrix-rust-sdk if you are building a Matrix bot or client in Rust, or embedding the same logic in Swift or Kotlin through the bindings. Start from matrix-sdk for a bot and matrix-sdk-ui for a full client, and stay off the internal crates.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.
Star history
- matrix-org/matrix-rust-sdk2,368 ★ · +32
| Repository | 2026-10-22 | 2026-11-25 |
|---|---|---|
| matrix-org/matrix-rust-sdk | 2.3k | 2.4k |
32 Stars in the last 34 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Three crates are public API and the rest are split for build times
The workspace holds many crates under crates/, but the README names only three as expected to be usable as direct dependencies: matrix-sdk-ui, matrix-sdk and matrix-sdk-crypto. Everything else is described as effectively internal-only, structured as separate crates for organization and to improve compilation times. Direct usage of them is discouraged.
That guidance has weight. An internal crate can change its interface between releases without the care a public one gets, so a project that imports one directly can break on an upgrade that touches nothing it depends on in the three supported crates. If you find yourself reaching for an internal crate, look for the same function re-exported from matrix-sdk first.
The layering runs bottom to top. The crypto crate stands alone, the mid-level client builds on the lower layers, and the UI crate sits on top for full clients.
matrix-sdk-crypto is a state machine with no network I/O
The crypto crate is described as a standalone encryption state machine with no network I/O. It provides end-to-end encryption support for Matrix clients and libraries, and the README points to a step-by-step tutorial on docs.rs.
No network I/O means the crate does not send or receive anything itself. The caller feeds it the data that arrives and carries out what it asks to send. That makes it testable and portable, and it also means using the crate directly leaves you with the syncing and transport work. Someone embedding it in an existing client takes on that wiring.
If you do not already have a sync loop, the README's own advice is to use the higher layers, where the SDK takes care of low-level details like encryption, syncing and room state. The repository also contains a bindings/matrix-sdk-crypto-ffi workspace member, which exposes the crypto layer to other languages.
matrix-sdk is the mid-level client for bots and custom clients
The README calls matrix-sdk a mid-level client library, ideal for building bots, custom clients or higher-level abstractions. Example usage lives in the examples directory, and the file list shows how wide it is: autojoin, backups, command_bot, cross_signing_bootstrap, custom_events, emoji_verification, get_profiles, getting_started, image_bot, login, oauth_cli, persist_session, qr-login, secret_storage and timeline.
Those names also map out features. There are examples for logging in with OAuth from a command line, for QR code login, for emoji verification and cross signing, for secret storage and key backups, and for keeping a session across restarts. Start with getting_started, then copy the example nearest your use case. The most recent matrix-sdk releases are 0.19.1 on 2026-09-18, 0.19.0 on 2026-09-16 and 0.18.0 on 2026-06-02, so the crate still carries a 0.x version number.
matrix-sdk-ui carries a reference client called multiverse
At the top of the stack, matrix-sdk-ui is a high-level client library for building full-featured UI clients with minimal setup. The README points to a reference client named multiverse, found under labs/multiverse, as the example.
The workspace file makes a distinction about what gets built. The comment in Cargo.toml says xtask, multiverse, testing and the bindings should only be built when invoked explicitly, and default-members lists only benchmarks and crates/*. Running a plain cargo build at the repository root therefore skips the reference client, so you have to name it to see it run.
Because matrix-sdk-ui is the layer that Element X leans on, its timeline and room list behavior is the part most exercised by a shipping app. The README also notes that a related examples/timeline directory exists for the lower-level crate.
Cargo.toml pins rust-version 1.96 and a resolver 3 workspace
The workspace sets rust-version to 1.96 under workspace.package and uses resolver 3. Both matter before you add the crate to a project. A toolchain older than 1.96 is outside what the workspace declares, so check your CI image and any distribution packages before you adopt the current series.
The workspace dependency table pins its shared dependencies with default-features turned off in many entries, for example anyhow, base64 and chrono. That keeps feature selection explicit, and it is why a dependency of your own may need features turned on that the SDK leaves off.
The repository also ships release tooling: RELEASING.md, release.toml and towncrier.toml, which points at changelog fragments. These are for maintainers, but they explain why releases are tagged per crate, as matrix-sdk-0.19.1 is.
Bindings reach Swift, Kotlin, JavaScript and Node.js, with the ffi crates as the entry
The README says the higher-level crates can be embedded in other environments such as Swift, Kotlin, JavaScript and Node.js, and sends you to the bindings/ directory. The workspace members include bindings/matrix-sdk-ffi and bindings/matrix-sdk-crypto-ffi, plus a uniffi-bindgen member.
The README excerpt does not document the build steps for each language. It does say Element uses the SDK in its Element X apps on iOS and Android, and mentions plans for web and desktop clients. Searches around this project mention React Native and wasm, but the README does not cover either, so verify the state of those in bindings/ before you plan around them.
Ownership also affects you. Development is sponsored and maintained by Element, and other clients named in the README, Fractal and iamb, are built on it. The license is Apache-2.0.
The README calls the library production ready and gives no stability promise beyond that
The Status section says the library is considered production ready and backs multiple client implementations, with Element X, Fractal and iamb named. It tells client developers they should feel confident building on it.
That is a statement about use in shipping apps. It is not a promise about interface stability across releases, and the version numbers are 0.x, where a minor bump can change the API. Read the changelog fragments before an upgrade.
The last push is 2026-10-23, and the repository is not archived. The sponsoring organization runs the code in its own mobile apps, which is the clearest evidence of maintenance the repository gives.
Editorial conclusion
Choose matrix-rust-sdk if you are building a Matrix bot or client in Rust, or embedding the same logic in Swift or Kotlin through the bindings. Start from matrix-sdk for a bot and matrix-sdk-ui for a full client, and stay off the internal crates. Before you commit, check the Rust toolchain your workspace needs, because Cargo.toml sets rust-version to 1.96, and pin the matrix-sdk release you tested, since the series is still at 0.x.
Frequently asked questions
What is a Rust SDK, in the case of matrix-rust-sdk?
Here it is a collection of libraries that make it easier to build Matrix clients in Rust. It handles low-level details like encryption, syncing and room state.
Which matrix-rust-sdk crates should I depend on directly?
matrix-sdk-ui, matrix-sdk and matrix-sdk-crypto. The README calls all other crates effectively internal-only and discourages direct usage.
Is matrix-rust-sdk production ready?
The README considers it production ready and says it backs Element X, Fractal and iamb. It is sponsored and maintained by Element under Apache-2.0.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/matrix-org-matrix-rust-sdk)Star history chart for your README
[](https://hysenlabs.com/projects/matrix-org-matrix-rust-sdk)Was this useful?