Commit Graph

622 Commits

Author SHA1 Message Date
Jonas Platte
2a140770a0 fix: Move runtime module from matrix-sdk-common to matrix-sdk-ffi (#5184)
This module only builds on non-wasm with the patched async-compat from
the workspace Cargo.toml's patch section, and it is only used by the ffi
crate. It is currently breaking the use of the SDK as a git dependency,
and would prevent the publishing of matrix-sdk-common (unless using
--no-verify, but then that would just break all users of the newly
published crates.io version).

This bug was introduced in
https://github.com/matrix-org/matrix-rust-sdk/pull/5089.

Signed-off-by: Jonas Platte <jplatte+matrix@posteo.de>
2025-06-05 19:30:15 +00:00
Daniel Salinas
a3225e5cd7 feat(wasm): Wasm equivalent of get_runtime_handle and corresponding tokio types (#5089)
Adds a Wasm equivalent of the get_runtime_handle method provided by
tokio, as well as Handle/Runtime types that can be used on either Wasm
or non-Wasm platforms interchangeably.

Dependent on https://github.com/matrix-org/matrix-rust-sdk/pull/5088
<!-- description of the changes in this PR -->

- [ ] Public API changes documented in changelogs (optional)

<!-- Sign-off, if not part of the commits -->
<!-- See CONTRIBUTING.md if you don't know what this is -->
Signed-off-by: Daniel Salinas

---------

Signed-off-by: Daniel Salinas <zzorba@users.noreply.github.com>
Co-authored-by: Daniel Salinas <danielsalinas@Daniels-MacBook-Pro-2.local>
Co-authored-by: Daniel Salinas <danielsalinas@daniels-mbp-2.myfiosgateway.com>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: Ivan Enderlin <ivan@mnt.io>
2025-06-05 08:07:01 +02:00
Valere Fedronic
0f73ffde68 feat(crypto): Add the EncryptionInfo to the Decrypted ProcessedToDeviceEvent variant
The `ProcessedToDeviceEvent::Decrypted` variant now also have an
`EncryptionInfo` field.

The enum variant  changed from `Decrypted(Raw<AnyToDeviceEvent>)` to `Decrypted {
raw: Raw<AnyToDeviceEvent>, encryption_info: EncryptionInfo) }`
2025-06-04 11:54:38 +02:00
Daniel Salinas
d3be744244 feat(wasm): Remove direct use of tokio::spawn in favor of matrix-sdk-common (#5159)
Mechanical move from tokio::spawn to matrix_sdk_common::executor::spawn
that has support for Wasm platforms. On non-Wasm, this shim defaults to
tokio::spawn.
2025-06-03 12:22:53 -04:00
Kévin Commaille
9a75007535 Upgrade Ruma
Use the newly released version.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-06-03 15:52:15 +02:00
Daniel Salinas
ba8998623e Fix annotations on comments for new StreamExt
Hook up use of new extension in matrix-sdk-ffi crate
2025-06-02 12:26:52 +02:00
Jonas Platte
9242d1869a refactor: Use native async fn in traits for BackingStore 2025-05-30 10:48:06 +02:00
Damir Jelić
db931c5d5c chore: Bump our decancer version
This removes the paste dependency decancer had. We still need to have a
denyc exception for paste because of rmp-serde and ratatui.
2025-05-29 11:40:37 +02:00
Hugh Nimmo-Smith
e90b105b36 feat(sdk): Add support for MSC4286
This patch updates Ruma to include support for the mx-external-payment-details span attribute from MSC4286.
2025-05-27 08:47:56 +02:00
Timo
6d5ad4eddc feat(widget-driver): Add to-device support
The widget Driver should be able to send and receive to-device events.
This is useful for element call encryption keys.

This PR focusses on the widget driver and machine logic. To
send/communicate the events from the widget to the driver.

It skips any encryption logic. Some of the encryption logic will be part
of crypto crate and the code in the widget driver crate should be kept
minimal once the crypto crate is ready.

---------

Co-authored-by: Valere <bill.carson@valrsoft.com>
2025-05-22 13:38:28 +02:00
Benjamin Bouvier
5c6238f132 chore(deps): bump wasm-bindgen-test 2025-05-22 11:50:13 +02:00
Benjamin Bouvier
b0e8b8a532 chore(deps): bump web-sys 2025-05-22 11:50:13 +02:00
Benjamin Bouvier
2984030f90 chore(ffi): configure the sentry dependency differently on android
On Android, we should use rustls instead of native-tls; this requires
unsetting the default features of the `sentry` crate, and specifying
them by hand instead.

For consistency, I've done the same for the non-android sentry
dependency.
2025-05-22 11:50:13 +02:00
Benjamin Bouvier
a3c82e9087 chore(deps): bump reqwest to 0.12.15 2025-05-22 11:50:13 +02:00
Benjamin Bouvier
c8474511a7 feat(ffi): add support for sentry logging 2025-05-22 11:50:13 +02:00
Stefan Ceriu
e48b1f6056 change(ffi): stop retrieving room list last messages from through the timeline
As per the plan defined in #4718:

```
the room_list_service::room::RoomInner shouldn't make use of its inner timeline;
it's only used in a direct getter, or to compute the latest room event, but it's not working
as intended, since local echoes aren't properly displayed in the room list.
This non-working feature can be removed, in favor of #4112
```
2025-05-21 16:38:20 +03:00
Mauro
154f29e5a0 feat(sdk): implement and observe MSC4278 config value
This patch
- Updates Ruma to use the improved MediaPreviewConfig event type that
also supports a `Default` for the content type
- Implemented a way to observe the stable and unstable values of the
event and return the used one accordingly, if no one is present the
default will be used
- Set the value (will only use unstable type for now)
2025-05-19 12:35:50 +02:00
Jonas Platte
e3bcd4d5b2 chore: Upgrade dirs to 6.0 in examples 2025-05-19 09:23:02 +02:00
Kévin Commaille
36667c1298 chore: Get rid of cargo-deny errors due to new advisories
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-05-14 15:42:46 +02:00
dependabot[bot]
3cd64ac03b chore(deps): Bump tokio from 1.43.0 to 1.43.1
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.43.0 to 1.43.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.43.0...tokio-1.43.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.43.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-13 14:58:30 +02:00
dependabot[bot]
7d992d1af8 chore(deps): Bump ring from 0.17.8 to 0.17.14
Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.14.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-version: 0.17.14
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-13 14:37:12 +02:00
Benjamin Bouvier
5da2235973 refactor(timeline): use TimelineEventKind::AddItem for UTDs 2025-05-13 14:15:00 +02:00
Benjamin Bouvier
de66047eee refactor(event cache): simplify Deduplicator so it only operates with the store impl 2025-05-13 10:17:21 +02:00
Ivan Enderlin
44a0745110 chore(base): Move the bitflags dependency in the workspace. 2025-05-12 17:15:43 +02:00
Mauro Romito
c023745dcf crates: update Ruma to support MSC 4278
This will later be handled once the account data observation PR is ready
2025-05-09 14:41:17 +02:00
Johannes Marbach
1554e05d8a refactor(send_queue): generalize SentRequestKey::Media and DependentQueuedRequestKind::UploadFileWithThumbnail to prepare for MSC4274 gallery uploads (#4897)
This was broken out of
https://github.com/matrix-org/matrix-rust-sdk/pull/4838 and is a
preliminary step towards implementing
[MSC4274](https://github.com/matrix-org/matrix-spec-proposals/pull/4274).
`SentRequestKey::Media` and
`DependentQueuedRequestKind::UploadFileWithThumbnail` are generalized to
allow chaining dependent media uploads and accumulating sent media
sources.

- [x] Public API changes documented in changelogs (optional)

---------

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Co-authored-by: Benjamin Bouvier <benjamin@bouvier.cc>
2025-04-24 09:52:33 +00:00
Damir Jelić
bc50cae35f feat(multiverse): Add support to join rooms you've been invited to 2025-04-16 11:35:57 +02:00
Ivan Enderlin
5d55bb4955 chore: Release matrix-sdk version 0.11.0 2025-04-11 10:51:30 +02:00
dependabot[bot]
bfbbe89989 chore(deps): Bump crossbeam-channel from 0.5.13 to 0.5.15
Bumps [crossbeam-channel](https://github.com/crossbeam-rs/crossbeam) from 0.5.13 to 0.5.15.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-channel-0.5.13...crossbeam-channel-0.5.15)

---
updated-dependencies:
- dependency-name: crossbeam-channel
  dependency-version: 0.5.15
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10 16:52:10 +02:00
Damir Jelić
ab90c1b945 refactor(sdk): Migrate away from the backoff crate to the backon crate
Since backon also has WASM support, this should mean that we can get rid
of the WASM specific HTTP client implementation.
2025-04-10 11:58:06 +02:00
Damir Jelić
68e3cdebdd chore: Bump the blake3 version 2025-04-09 16:37:40 +02:00
Damir Jelić
511cf78d51 chore: Bump the rusqlite version 2025-04-09 16:37:40 +02:00
Damir Jelić
f4eea708fa chore: Update the ByteSize crate version we're using 2025-04-09 16:37:40 +02:00
Damir Jelić
28e475b1fc chore(multiverse): Get rid of an unused dependency 2025-04-07 14:17:10 +02:00
Damir Jelić
71b6b213c4 refactor(multiverse): Move the details mode into a tab-based popout 2025-04-07 14:17:10 +02:00
Damir Jelić
fad63b9a64 feat(multiverse): Recovery support 2025-04-07 14:17:10 +02:00
Damir Jelić
774bff00a0 refactor(multiverse): Events view 2025-04-07 14:17:10 +02:00
Damir Jelić
b49fd2b473 feat(multiverse): Only open the read receipt screen if a room is selected 2025-04-07 14:17:10 +02:00
Damir Jelić
238fbdbe82 refactor(multiverse): Use the Mutex from the common crate to avoid calling unwrap 2025-04-07 14:17:10 +02:00
Kévin Commaille
b94be8d509 Upgrade tokio
To get rid of advisory

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-04-07 12:04:06 +02:00
Kévin Commaille
24e6d780fc Upgrade Ruma to version 0.12.2
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-04-07 12:04:06 +02:00
dependabot[bot]
b4a8089b40 chore(deps): Bump openssl from 0.10.70 to 0.10.72 2025-04-04 23:28:09 +02:00
Ivan Enderlin
13ca27d66a chore(cargo): Update eyeball and imbl.
This patch updates `eyeball`, `eyeball-im` and `eyeball-im-util` from
`main` branch to latest releases.

This patch also updates `imbl` to 5.0.
2025-04-04 10:09:12 +02:00
Benjamin Bouvier
f6e223edf6 refactor(timeline): bump as_variant and make more use of its pattern matching form 2025-03-27 10:42:22 +01:00
Ivan Enderlin
660d4e7ccb feat(sqlite): Add StoreOpenConfig and open_with_config for all stores.
This patch adds a new `StoreOpenConfing` type to configure the store
when opening it and when creating the pool of connections to SQLite via
`deadpool_sqlite`.

This patch also adds a new `open_with_config` constructor on all
stores, namely `SqliteCryptoStore`, `SqliteEventCacheStore` and
`SqliteStateStore`.
2025-03-26 11:01:52 +01:00
Kévin Commaille
29f6606d99 refactor(examples): Rename oidc_cli to oauth_cli
And update the docs.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-24 09:32:05 +00:00
Kévin Commaille
f8abb85e9e refactor(oidc_cli): Use LocalServerBuilder
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 09:55:01 +01:00
Kévin Commaille
3a7b0e9404 refactor(oidc): Remove dependency on mas-oidc-client
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-14 18:03:34 +01:00
Kévin Commaille
215853cf67 chore: Upgrade ruma
To pull in`GrantType::DeviceCode` and a fix for the generated `DeviceId`
length.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-12 13:41:40 +01:00
Benjamin Bouvier
01bb8093d0 feat(ffi): add a function to setup a lightweight tokio runtime
Creating many threads may use a bit of memory: on a machine with N
devices, exactly N*2 MB of memory may be consumed.

That might be a lot for a NSE process on iOS, which can only have up to
16 MB of RAM allocated for it. For this case, we introduce a new FFI
method `setup_lightweight_tokio_runtime` which will spawn at most 4
worker threads and 1 blocking thread. This should be sufficient for most
use cases.
2025-03-11 16:05:52 +01:00