Robrix: a Rust Matrix client built atop Robius
Robrix is a Matrix chat client written in Rust to demonstrate the functionality of Project Robius, a framework for multi-platform application development in Rust. Robrix is written using the Makepad UI toolkit.
Note
Check out our most recent talks and presentations for more info:
- Robrix: a pure Rust multi-platform app for chat and beyond (from GOSIM China 2024)
- Videos: (YouTube link coming soon)
- Slides: PowerPoint (25MB), PDF version (6MB)
- Robrix: a Matrix chat client and more (from GOSIM Europe 2024)
- Videos: YouTube 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.
Host OS | Target Platform | Builds? | Runs? |
---|---|---|---|
macOS | macOS | ✅ | ✅ |
macOS | Android | ✅ | ✅ |
macOS | iOS | ✅ | ✅ |
Linux | Linux | ✅ | ✅ |
Linux | Android | ✅ | ✅ |
Windows | Windows | ✅ | ✅ |
Windows | Android | ✅ | ✅ |
-
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
-
Then, build and run Robrix (you can optionally add
--release
afterrun
):
cargo run -- 'USERNAME' 'PASSWORD' ['HOMESERVER_URL']
- Robrix only supports a standard username + password login currently.
- Note the usage of single quotes (not double quotes), which will prevent your shell from treating certain symbols as globs/regex patterns.
- If you created your Matrix account using a third-party Single Sign On (SSO) like a Google account, you can set a standard password by using Element's password reset form.
- The
HOMESERVER_URL
argument is optional and uses the"https://matrix-client.matrix.org/"
URL by default.- The Matrix homeserver must support Sliding Sync, the same requirement as Element X.
-
Install the
cargo-makepad
build tool:cargo install --force --git https://github.com/makepad/makepad.git --branch rik cargo-makepad
-
Use
cargo-makepad
to install the Android toolchain, with the full NDK:cargo makepad android install-toolchain --full-ndk
-
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.
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.
- View list of joined rooms
- View timeline of events in a single room
- Fetch and display room avatars
- Fetch user profiles (displayable names)
- Fetch and display user profile avatars
- Backwards pagination (upon viewing a room timeline)
- Dynamic backwards pagination based on scroll position/movement: project-robius#109
- Loading animation while waiting for pagination request: project-robius#109
- Stable positioning of events during simple timeline update
- Stable positioning of events during complex/multi-part timeline update
- Display simple text-only messages
- Display image messages (PNG, JPEG)
- Rich text formatting for message bodies
- Display reactions (annotations)
- Handle opening links on click
- Linkify plaintext hyperlinks
- Reply previews above messages: project-robius#82
- Send messages (standalone, no replies)
- Interactive reaction button, send reactions: project-robius#115
- Reply button, send reply: project-robius#83
- Re-spawn timeline as focused on an old event after a full timeline clear: project-robius#103
- Display multimedia (audio/video/gif) message events: project-robius#120
- Collapsible/expandable view of contiguous "small" events: project-robius#118
- E2EE device verification, decrypt message content: project-robius#116
- Persistence of app session to disk: project-robius#112
- Username/password login screen: project-robius#113
- SSO, other 3rd-party auth providers login screen: project-robius#114
- Side panel showing detailed user profile info (click on their Avatar)
- Ignore and unignore users (see known issues)
- User settings screen
- Dedicated view of spaces
- Dedicated view of direct messages (DMs): project-robius#139
- Link previews beneath messages: project-robius#81
- Keyword filters for the list of all rooms: project-robius#123
- Search messages within a room: project-robius#122
- Room browser, search for public rooms
- Room creation
- Room settings/info screen
- Room members pane
- Save/restore events in rooms to/from the event cache upon app shutdown/start: project-robius#164
- Matrix-specific links are not yet fully handled (https://matrix.to/...)
- Ignoring/unignoring a user clears all timelines (see: matrix-org/matrix-rust-sdk#1703); the timeline will be re-filled using gradual pagination, but the viewport is not maintained