用户可借助该项目构建跨平台的 Matrix 聊天应用,它是基于 Robius 框架和 Makepad UI 工具包开发的纯 Rust 客户端,支持多平台构建,具备消息收发、E2EE 加密、多媒体展示等核心聊天功能。【此简介由AI生成】
| Files | Last commit | Last update |
|---|---|---|
| 2 years ago | ||
| 9 months ago | ||
| 1 year ago | ||
| 9 months ago | ||
| 9 months ago | ||
| 1 year ago | ||
| 9 months ago | ||
| 9 months ago | ||
| 2 years ago | ||
| 1 year ago | ||
| 10 months ago | ||
| 2 years ago | ||
| 1 year ago |
Robrix: a Rust Matrix client built atop Robius
Robrix is a Matrix chat client written in Rust to exemplify the features of Project Robius, a framework for multi-platform application development in Rust. Robrix is written using the Makepad UI toolkit.
Check out our most recent talks and presentations for more info:
- Robrix: a complex, multi-platform app in Rust for secure chat using Matrix (Rust China Conf 2025)
- Videos: YouTube link, BiliBili Link
- Slides: PowerPoint (13MB), PDF version (13MB)
- Robrix: a pure Rust multi-platform app for chat and beyond (GOSIM China 2024)
- Videos: YouTube link, BiliBili link
- Slides: PowerPoint (25MB), PDF version (6MB)
- An interview about Robrix on Matrix Live!
- Robrix: a Matrix chat client and more (GOSIM Europe 2024)
- Videos: YouTube link, BiliBili link
- Slides: PowerPoint (22MB), PDF version (16MB)
The following table shows which host systems can currently be used to build Robrix for which target platforms.
| Target Platform | Host OS | Builds? | Runs? |
|---|---|---|---|
| macOS | macOS | ✅ | ✅ |
| Linux | Linux | ✅ | ✅ |
| Windows | Windows | ✅ | ✅ |
| Android | Any | ✅ | ✅ |
| iOS | macOS | ✅ | ✅ |
| OpenHarmony | Any | ✅ | 🚧 |
Known issues
- Drag-n-drop on Linux isn't implemented by Makepad, so you cannot drag room tabs around yet. (see: https://github.com/makepad/makepad/issues/650)
- Matrix-specific links (
https://matrix.to/...) aren't fully handled in-app yet. - Ignoring/unignoring a user clears all timelines (see: https://github.com/matrix-org/matrix-rust-sdk/issues/1703); the timeline will be re-filled gradually via back pagination, but the viewport position is not maintained.
- Currently, accessing system geolocation on Android may not succeed due to failing to prompt the user for permission. Please enable the location permission in the App Info settings page for Robrix, and then it should work as expected.
Important
Robrix only works with Matrix homeservers that support native Sliding Sync, just like other modern clients (e.g., Element X).
Building & Running Robrix on Desktop
-
First, install Rust.
-
If you're building on Linux or WSL on Windows, install the required dependencies. Otherwise, proceed to step 3.
openssl,clang/libclang,binfmt,Xcursor/X11,asound/pulse.
On a Debian-like Linux distro (e.g., Ubuntu), run the following:
sudo apt-get update sudo apt-get install libssl-dev libsqlite3-dev pkg-config binfmt-support libxcursor-dev libx11-dev libasound2-dev libpulse-dev libwayland-dev libxkbcommon-dev -
Then, build and run Robrix.
cargo run --release
Building & Running Robrix on Mobile: Android, iOS, iPadOS
- Install the
cargo-makepadbuild tool:cargo install --force --git https://github.com/makepad/makepad.git --branch dev cargo-makepad
Android
-
Use
cargo-makepadto install the Android toolchain:cargo makepad android install-toolchain -
Build and run Robrix using
cargo-makepad:cargo makepad android run -p robrix --release- You'll need to connect a physical Android device with developer options enabled, or start up an emulator using Android Studio.
- API version 33 or higher is required, which is Android 13 and up.
- You'll need to connect a physical Android device with developer options enabled, or start up an emulator using Android Studio.
iOS / iPadOS
-
Use
cargo-makepadto install the iOS toolchain:rustup toolchain install nightly cargo makepad apple ios install-toolchain -
Perform the following one-time setup steps:
- If running on a real iOS device, enable your iPhone's Developer Mode: Settings → Privacy & Security → Developer Mode → turn on Developer Mode and reboot.
- Ensure your Apple Developer account is properly set up on your Mac.
- Create an empty "dummy" project in Xcode:
- File → New → Project to create a new "App"
- Set the Product Name as
robrix. (used in the--orgargument later) - Set the Organization Identifier to a value of your choice, e.g.,
rs.robius. (used in the--appargument later) - For Project Signing & Capabilities, select the proper Apple Developer team account.
- In Xcode, Build/Run this project once to install and run the app on the simulator (or device).
- Once the simulator or device has the empty "dummy" app installed and running properly, then you're ready to build the actual Robrix application below.
Running on an iOS simulator
- If you're using an iOS simulator, do the following:
cargo makepad apple ios \ --org=rs.robius \ --app=robrix \ run-sim -p robrix --release
Running on a real iOS device
-
Run the following command to show all provisioning profiles, signing identities, and device identifiers on your Mac.
cargo makepad apple list- You must select which values you need to use for each of the 3 above items.
- If you get an error from the above command, then please ensure you performed the full iOS setup instructions above, and that you have a valid Apple Developer account with certificates installed on your Mac.
-
Run the following command, filling in the unique starting characters chosen above.
cargo makepad apple ios \ --profile=<unique-starting-hex-string> \ --cert=<UNIQUE_STARTING_HEX_STRING> \ --device=<UNIQUE-STARTING-HEX-STRING> \ --org=rs.robius \ --app=robrix \ run-device -p robrix –release
Feature status tracker
These are generally sorted in order of priority. If you're interested in helping out with anything here, please reach out via a GitHub issue or on our Robius matrix channel.
Basic room views and fundamental actions
Auxiliary features, login, registration, settings
Packaging Robrix for Distribution on Desktop Platforms
Tip
We already have pre-built releases of Robrix available for download.
- Install
cargo-packager:
rustup update stable ## Rust version 1.79 or higher is required
cargo +stable install --force --locked cargo-packager
For posterity, these instructions have been tested on cargo-packager version 0.10.1, which requires Rust v1.79.
- Install the
robius-packaging-commandscrate with themakepadfeature enabled:
cargo install --locked --git https://github.com/project-robius/robius-packaging-commands.git
- Then run the packaging command, which must build in release mode:
cargo packager --release ## --verbose is optional
- If you want to hide the default cmd prompt console on Windows, use the following config:
RUSTFLAGS="--cfg hide_windows_console" cargo packager --release
Platform-specific considerations
Note that due to platform restrictions, you can currently only build:
- Linux packages on a Linux OS machine
- Windows installer executables on a Windows OS machine
- macOS disk images / app bundles on a macOS machine
- iOS apps on a macOS machine.
- Android, on a machine with any OS!
There are some additional considerations when packaging Robrix for macOS:
Important
You will see a .dmg window pop up — please leave it alone, it will auto-close once the packaging procedure has completed.
Tip
If you receive the following error:
ERROR cargo_packager::cli: Error running create-dmg script: File exists (os error 17)
then open Finder and unmount any Robrix-related disk images, then try the above cargo packager command again.
Tip
If you receive an error like so:
Creating disk image...
hdiutil: create failed - Operation not permitted
could not access /Volumes/Robrix/Robrix.app - Operation not permitted
then you need to grant "App Management" permissions to the app in which you ran the cargo packager command, e.g., Terminal, Visual Studio Code, etc.
To do this, open System Preferences → Privacy & Security → App Management,
and then click the toggle switch next to the relevant app to enable that permission.
Then, try the above cargo packager command again.
After the command completes, you should see both the Robrix.app and the .dmg in the dist/ directory.
You can immediately double-click the Robrix.app bundle to run it, or you can double-click the .dmg file to
Note that the
.dmgis what should be distributed for installation on other machines, not the.app.
If you'd like to modify the .dmg background, here is the Google Drawings file used to generate the MacOS .dmg background image.
Credits
Introduction
用户可借助该项目构建跨平台的 Matrix 聊天应用,它是基于 Robius 框架和 Makepad UI 工具包开发的纯 Rust 客户端,支持多平台构建,具备消息收发、E2EE 加密、多媒体展示等核心聊天功能。【此简介由AI生成】
Customize your domain