Online / 5 & 6 February 2022

visit

The matrix-rust-sdk

One SDK to rule them all


Matrix (https://matrix.org) is an open protocol for secure, decentralised communication - defining an end-to-end-encrypted real-time communication layer for the open Web. Historically the network has been made up of newly written native Matrix clients, or bridges to 3rd party existing chat systems (e.g. Slack, Discord, Telegram).

The matrix-rust-sdk is a modular Matrix client library, meant to be a robust implementation of the protocol, and to make even the most advanced features such as E2EE easy to use. This talk will walk you through the design decisions and the tradeoffs that come with it, give you an overview of where we're at and where we're going with Web-Assembly, and finally what the future holds for the matrix-rust-sdk. Finally it will be connected to a real-life example of software using the matrix-rust-sdk: Fractal-Next.

Matrix (https://matrix.org) is an open protocol for secure, decentralised communication - defining an end-to-end-encrypted real-time communication layer for the open Web. Historically the network has been made up of newly written native Matrix clients, or bridges to 3rd party existing chat systems (e.g. Slack, Discord, Telegram).

The matrix-rust-sdk is a modular Matrix client library, meant to be a robust implementation of the protocol, and to make even the most advanced features such as E2EE easy to use.

It's a flexible library which can be used both to extend existing projects or to create new ones. It is notably used in the 18 years old IRC client WeeChat to teach it to speak Matrix. It has also been used as base for the re-write of GNOME's Matrix client Fractal.

Thanks to its very modular nature, clients can either use the whole SDK, like WeeChat and Fractal do, or a sub-component. Element R uses matrix-rust-sdk's crypto crate via Kotlin bindings.

This talk will walk you through the design decisions and the tradeoffs that come with it, give you an overview of where we're at and where we're going with Web-Assembly, and finally what the future holds for the matrix-rust-sdk. Finally it will be connected to a real-life example of software using the matrix-rust-sdk: Fractal-Next.

Fractal is a popular Matrix chat client for the GNOME desktop which has been in development since 2017. Fractal was designed to work well for collaboration in large groups, such as free software projects. For a long time there were two main areas that needed improvements: performance and maintainability were limited. What’s more, it lacked end-to-end encryption (E2EE) support.

Over the course of 2021 we spent countless hours rewriting Fractal from scratch and now we are close to the first release. Fractal-next is built on top of the matrix-rust-sdk, a set of libraries that help to build Matrix clients. The client, still written in Rust, now uses GTK4. During development, the focus was on performance, maintainability and E2EE. And of course, we kept mobile support.

Speakers

Photo of Julian Sparber Julian Sparber
Damir Jelić

Links