Files
matrix-rust-sdk/labs
Ivan Enderlin 1cf0601ba3 refactor(sdk) Introduce RoomEventCacheStateLock and read/write guards.
This patch extracts fields from `RoomEventCacheState` and move them
into `RoomEventCacheStateLock`. This lock provides 2 methods: `read`
and `write`, respectively to acquire a read-only lock, and a write-only
lock, represented by the `RoomEventCacheStateLockReadGuard` and the
`RoomEventCacheStateLockWriteGuard` types.

All “public” methods on `RoomEventCacheState` now are facade to the read
and write guards.

This refactoring makes the code to compile with the last change in
`EventCacheStore::lock`, which now returns a `EventCacheStoreLockState`.
The next step is to re-load `RoomEventCacheStateLock` when the lock is
dirty! But before doing that, we need this new mechanism to centralise
the management of the store lock.
2025-11-25 15:41:27 +01:00
..
2022-12-15 16:48:55 +01:00

Experiments

This directory contains experiments, work-in-progress crates, or other code and documentation, that do not fall under the same stability guarantees as the main crates (matrix-sdk, matrix-sdk-crypto, etc.).

Lab projects might be abandoned and possibly removed at any time.


That said, this directory is meant to freely explore unconventional or interesting ways the Matrix Rust SDK can evolve, feel free to propose an experiment.

Current experiments

  • multiverse: a TUI client mostly for quick development iteration of SDK features and debugging.
    • Run with cargo run --bin multiverse matrix.org ~/.cache/multiverse-cache.
    • To inspect network requests, there is a --proxy option which can use in combination with mitmproxy: cargo run --bin multiverse -- --proxy http://localhost:8080 matrix.org ~/.cache/multiverse-cache

Archived experiments

Link to PR that deleted the experiment from the repo, newest first: