mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-07 15:33:45 -04:00
933033cc2532c53abc2e68ccb783979323dc5183
LinkedChunk.
This patch introduces `EmptyChunk`, a new enum used to represent whether empty chunks must be removed/unlink or kept from the `LinkedChunk`. It is used by `LinkedChunk::remove_item_at`. Why is it important? For example, imagine the following situation: - one inserts a single event in a new chunk (possible if a (sliding) sync is done with `timeline_limit=1`), - one inserts many events at the position of the previous event, with one of the new events being a duplicate of the first event (possible if a (sliding) sync is done with `timeline_limit=10` this time), - prior to this patch, the older event was removed, resulting in an empty chunk, which was removed from the `LinkedChunk`, invalidating the insertion position! So, with this patch: - `RoomEvents::remove_events` does remove empty chunks, but - `RoomEvents::remove_events_and_update_insert_position` does NOT remove empty chunks, they are kept in case the position wants to insert in this same chunk.
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%