-
Notifications
You must be signed in to change notification settings - Fork 9
feat: use ubrn for wasm target [WPB-20912] #1528
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a98f433 to
cb5bc36
Compare
cb5bc36 to
7bf2b56
Compare
52205b8 to
7a1757e
Compare
32b1d51 to
dea4e35
Compare
7b62e01 to
b0a8720
Compare
The import of inMemoryDatabase pointed to the old file, idk if this got messed up during rebase. cipherSuite should also be imported from the ts file instead of the js file in this bun test.
uniffi generates interfaces that it uses in function signatures. At this point we are aware that we loose some type safety because the Interface is a weak type and the actual uniffi class that implements the type is a strong type. We consider flagging this in the ubrn repo.
- ubrns factories have create, new and default methods with links in docs strings that can't be resolved. - uniffiDestroy methods have an inheritDocs tag which fails, potentially because we mock ubrn for the types (should be resolved with next release)
Compiling the intermediate wasm crate produces some deprecation warnings that we ignore at this point.
we have to call wasm-build separately
ubrn doesn't allow us to reuse the ffi artifact. We should consider contributing to it so this is possible but for now we should not depend on this artifact
We want to define these functions as static members instead of instance members. Thus, we define them as free functions here and make them static members in the wrappers due to uniffi limitations. This also removes some code duplication between CoreCrypto and CoreCryptoContext on rust side.
This aligns the methods with ts
This aligns the methods with ts and swift
The bun postinstall script needs yarn. Fortunately, it is enough to provide it as a dev dependency.
We don't use this file. Make stamps and CI artifacts should not depend on it.
e0758f8 to
81b8c47
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's new in this PR
This PR removes the explicit usage of wasm-bindgen for target
wasm32-unknown-unknown.It replaces it with
uniffi-bindgen-react-nativewhich takes uniffi annotations to create a wasm-bindgen crate from which it compiles towasm32-unknown-unknown.Here an overview of what's still open to do:
A very helpful reference is the ubrn documentation:
https://jhugman.github.io/uniffi-bindgen-react-native/guides/web/pre-installation.html
PR Submission Checklist for internal contributors
SQPIT-764feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.