Skip to content

Move to Uniffi 0.29, adjust async callback macros #5080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zzorba
Copy link
Contributor

@zzorba zzorba commented May 23, 2025

  • Moves to a commit just past uniffi 29.2, which includes changes needed to target wasm32-unknown-unknown targets for web-browsers.
  • Adjust imports in toml files to import the proper parts of tokio, and avoid those that are incompatible on wasm32 platforms.
  • matrix-sdk-ffi will not compile on wasm32 yet, but this is a step towards that goal.

Also contains matrix-sdk-common changes from #5079

  • Public API changes documented in changelogs (optional)

Signed-off-by: Daniel Salinas

@jplatte jplatte changed the title Move to Uniffi 29, adjust async callback macros Move to Uniffi 0.29, adjust async callback macros May 23, 2025
@zzorba zzorba force-pushed the async-callback-infrastructure branch from f783222 to 0c20635 Compare May 23, 2025 16:51
Copy link

codecov bot commented May 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.83%. Comparing base (f108840) to head (76aecab).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5080   +/-   ##
=======================================
  Coverage   85.83%   85.83%           
=======================================
  Files         333      333           
  Lines       36158    36158           
=======================================
+ Hits        31035    31037    +2     
+ Misses       5123     5121    -2     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zzorba zzorba force-pushed the async-callback-infrastructure branch 4 times, most recently from e61d4d6 to 5169e21 Compare May 23, 2025 19:31
This commit completes the uniffi upgrade from 0.28.0 to 0.29.1 and establishes the infrastructure for async callbacks in WASM32 environments.

Key changes:
- Upgrade uniffi to 0.29.1 with git source for async callback support
- Fix FFI macros to use smart async runtime selection for WASM32 vs native
- Update tokio features across matrix-sdk crates for WASM32 compatibility
- Add TypeScript bindings configuration to uniffi.toml
- Fix xtask build system for uniffi 0.29 API changes
@zzorba zzorba force-pushed the async-callback-infrastructure branch from 5169e21 to 76aecab Compare May 23, 2025 19:36
@zzorba
Copy link
Contributor Author

zzorba commented May 23, 2025

Looks like the uniffi-go tool that is being used has been semi-abandoned by the maintainers. Curious what you recommend doing in this situation.

@poljar
Copy link
Contributor

poljar commented May 24, 2025

Looks like the uniffi-go tool that is being used has been semi-abandoned by the maintainers. Curious what you recommend doing in this situation.

Huh? Are we talking about the same thing? We're using uniffi-bindgen-go for our integration tests, which has been updated to 0.28.3 recently: NordSecurity/uniffi-bindgen-go#75.

@zzorba
Copy link
Contributor Author

zzorba commented May 27, 2025

Yes that repo -- I was reading an issue talking about a past uniffi upgrade, and the maintainers said "PRs welcome but we have no planned updates"

I had claude code take a crack at the upgrade to 0.29.2 here NordSecurity/uniffi-bindgen-go#77, we will see what they think.

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.

2 participants