mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-07 07:27:45 -04:00
ec7fa762404aa80945e2111cc16517e22cd643e4
roominfo_update API.
First off, this patch removes the `RoomInfoNotableUpdate::trigger_room_list_update` field. It is replaced by a `reasons: RoomInfoNotableUpdateReasons` 8-bit unsigned integer. It addresses the following issues: 1. When a subscriber receives a `RoomInfoNotableUpdate`, they have no idea what has triggered this update. 2. In `matrix_sdk_base::sliding_sync::BaseClient::process_sliding_sync_e2ee`, we were triggering an update even if the latest event wasn't modified: it is a false-positive, it was a bug and a waste of resources. Now it's more refined, see the why below. Second, this patch removes the second `trigger_room_list_update` argument of `matrix_sdk_base::BaseClient::apply_changes`. This method now knows where to find the reasons for the room info notable updates, see next point. Third, this patch adds a new `matrix_sdk::StateChanges::room_info_notable_updates` field which is a B-tree map between an `OwnedRoomId` and a `RoomInfoNotableUpdateReasons`. The idea is that all places that receive a `StateChanges` can also create a room info notable update with a specific reason. This is a finer grained mechanism, and it avoids to pass new arguments everywhere. It's cleaner. Finally, it's easier than ever to add a new reason and to propagate it to subscribers.
matrix-rust-sdk
matrix-rust-sdk is an implementation of a Matrix client-server library in Rust.
Project structure
The rust-sdk consists of multiple crates that can be picked at your convenience:
- matrix-sdk - High level client library, with batteries included, you're most likely interested in this.
- matrix-sdk-base - No (network) IO client state machine that can be used to embed a Matrix client in your project or build a full fledged network enabled client lib on top of it.
- matrix-sdk-crypto - No (network) IO encryption state machine that can be used to add Matrix E2EE support to your client or client library.
Minimum Supported Rust Version (MSRV)
These crates are built with the Rust language version 2021 and require a minimum compiler version of 1.70.
Status
The library is in an alpha state, things that are implemented generally work but the API will change in breaking ways.
If you are interested in using the matrix-sdk now is the time to try it out and provide feedback.
Bindings
Some crates of the matrix-rust-sdk can be embedded inside other
environments, like Swift, Kotlin, JavaScript, Node.js etc. Please,
explore the bindings/ directory to learn more.
License
Description
Languages
Rust
99.7%
HTML
0.2%