Skip to content

feat(wasm): Upgrade to uniffi 0.29.3 to support wasm targets#5189

Closed
zzorba wants to merge 3 commits into
matrix-org:mainfrom
filament-dm:wasm_uniffi_upgrade
Closed

feat(wasm): Upgrade to uniffi 0.29.3 to support wasm targets#5189
zzorba wants to merge 3 commits into
matrix-org:mainfrom
filament-dm:wasm_uniffi_upgrade

Conversation

@zzorba

@zzorba zzorba commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

Upgrade to what will soon be uniffi 0.29.3 (release is planned for next week). This mostly concerns an upgrade of the xtask orchestration system, but there were some small changes to the .udl spec that were needed as well.

This will likely produce issues with the complement-crypto package, which seems to still be using uniffi 0.25 to build.

  • Public API changes documented in changelogs (optional)

Signed-off-by: Daniel Salinas

@zzorba zzorba changed the title Upgrade to uniffi 29.x to support wasm targets feat(wasm): Upgrade to uniffi 29.x to support wasm targets Jun 6, 2025
@codecov

codecov Bot commented Jun 6, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.09%. Comparing base (47e8181) to head (bc1129a).
⚠️ Report is 1414 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5189   +/-   ##
=======================================
  Coverage   85.08%   85.09%           
=======================================
  Files         328      328           
  Lines       36877    36877           
=======================================
+ Hits        31376    31379    +3     
+ Misses       5501     5498    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

use uniffi_bindgen::BindgenCrateConfigSupplier;

#[derive(Debug, Clone, Default)]
pub struct CrateConfigSupplier {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have some docs. What does this config supplier do differently from the default upstream one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which upstream class one are you seeing? I only see the trait and an 'Empty' supplier in the 2.9.x versions of Uniffi.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I had a seen a "default config supplier". There seem to be two upstream though: https://docs.rs/uniffi_bindgen/0.29.3/uniffi_bindgen/cargo_metadata/struct.CrateConfigSupplier.html is the other one.

Comment thread xtask/src/kotlin.rs Outdated
@zzorba zzorba changed the title feat(wasm): Upgrade to uniffi 29.x to support wasm targets feat(wasm): Upgrade to uniffi 0.29.3 to support wasm targets Jun 7, 2025
@zzorba zzorba marked this pull request as ready for review June 12, 2025 12:54
@zzorba zzorba requested a review from a team as a code owner June 12, 2025 12:54
@zzorba zzorba requested review from Hywan and removed request for a team June 12, 2025 12:54
@Hywan

Hywan commented Jun 16, 2025

Copy link
Copy Markdown
Member

What's the status of this PR?

@zzorba

zzorba commented Jun 17, 2025

Copy link
Copy Markdown
Contributor Author

@Hywan this PR is still necessary, it upgrades us to the most recent uniffi (0.29.3) which contains support for Wasm targets. Without it the matrix-sdk-ffi crate will not compile.

It is unfortunately blocked on the complement-crypto library, which I believe is blocked on NordSecurity considering an upgrade I submitted NordSecurity/uniffi-bindgen-go#77.

I believe Matthew has asked someone to look into the complement-crypto issue, which I believe is currently monkey-patching to work with a very old version of uniffi.

@poljar

poljar commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

Superseded by #5808.

I'm not particularly sure why this PR is so much more complex compared to #5808, so if some of this complexity is needed please open a new PR on top of #5808.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants