-
Notifications
You must be signed in to change notification settings - Fork 303
feat(wasm): Add lib to matrix-sdk-ffi target #5242
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
feat(wasm): Add lib to matrix-sdk-ffi target #5242
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, that PR description helps. Maybe I just missed where you explained this before. I would love if you could make this a multi-line array with explanations what each individual crate-type is for, but I think this can merge without that too. (I'll let the actual team do the merging though)
So |
I seem to remember it was staticlib -> iOS, cdylib -> android. |
Yep, just read the uniffi docs and that's what it says. I think my android react-native tool might be using the static lib, which was the source of my confusion. Updated the Cargo.toml file with comments. |
Could you rebase this to get the CI going? |
The uniffi tool for generating JS/Wasm bindings utilizes rust as its intermediate language. As a result, the 'target' uniffi annotated library needs to be marked as a 'lib' so that the generated rust code can utilize it.
e7ab2c0
to
ccd2aca
Compare
Rebased |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #5242 +/- ##
==========================================
- Coverage 90.13% 90.13% -0.01%
==========================================
Files 334 334
Lines 104717 104717
Branches 104717 104717
==========================================
- Hits 94389 94387 -2
- Misses 6275 6276 +1
- Partials 4053 4054 +1 ☔ View full report in Codecov by Sentry. |
The uniffi tool for generating JS/Wasm bindings utilizes rust as its intermediate language.
As a result, the 'target' uniffi annotated library needs to be marked as a 'lib' so that the generated rust code can utilize it to generate the Wasm create + typescript bindings.
Signed-off-by: Daniel Salinas