Skip to content
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

bindings: Expose the PkEncryption stuff in the crypto crate bindings #3971

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

poljar
Copy link
Contributor

@poljar poljar commented Sep 10, 2024

Again a draft until we get things merged in vodozemac land.

@bmarty and @Velin92 I think this is all you need for the legacy apps. Please shout if there's more needed.

@bmarty
Copy link
Contributor

bmarty commented Sep 10, 2024

@poljar I've got an issue when building this branch, not sure this is related to your change.

The command:

./scripts/build.sh -p ../matrix-rust-sdk -m crypto -t aarch64-linux-android

(from the project https://github.com/matrix-org/matrix-rust-components-kotlin)

and the error:

-- Generate uniffi files
-- library_path = /Users/bmarty/workspaces/matrix-rust-sdk/target/aarch64-linux-android/reldbg/libmatrix_sdk_crypto_ffi.so
Error: Constructor return type must be Self or Arc<Self>

any ideas?

@poljar
Copy link
Contributor Author

poljar commented Sep 11, 2024

@poljar I've got an issue when building this branch, not sure this is related to your change.

The command:

./scripts/build.sh -p ../matrix-rust-sdk -m crypto -t aarch64-linux-android

(from the project https://github.com/matrix-org/matrix-rust-components-kotlin)

and the error:

-- Generate uniffi files
-- library_path = /Users/bmarty/workspaces/matrix-rust-sdk/target/aarch64-linux-android/reldbg/libmatrix_sdk_crypto_ffi.so
Error: Constructor return type must be Self or Arc<Self>

any ideas?

Seems like I can't return Option<Arc<Self>> in the constructor, what I can return is Result<Arc<Self>>... Well OK, we'll add an error type.

@poljar
Copy link
Contributor Author

poljar commented Sep 11, 2024

@bmarty should work now, I changed the offending function to return an error instead.

@bmarty
Copy link
Contributor

bmarty commented Sep 11, 2024

@bmarty should work now, I changed the offending function to return an error instead.

Thanks, it's now compiling.
/me does the next steps.

@bmarty
Copy link
Contributor

bmarty commented Sep 11, 2024

OK, the code change is in this commit, you may want to double check: element-hq/element-android@355621b

@poljar poljar force-pushed the poljar/update-vodozemac branch 2 times, most recently from 3655c69 to 506a449 Compare September 11, 2024 12:37
Base automatically changed from poljar/update-vodozemac to main September 11, 2024 15:03
@poljar poljar force-pushed the poljar/pk-encryption-bingings branch from 3b2664b to 6905ed2 Compare September 11, 2024 15:06
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.28%. Comparing base (3555474) to head (1fa5132).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3971   +/-   ##
=======================================
  Coverage   84.28%   84.28%           
=======================================
  Files         266      266           
  Lines       28286    28286           
=======================================
  Hits        23840    23840           
  Misses       4446     4446           

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

@poljar poljar force-pushed the poljar/pk-encryption-bingings branch from 6905ed2 to 22ac2e0 Compare September 11, 2024 18:18
@poljar poljar marked this pull request as ready for review September 12, 2024 07:35
@poljar poljar requested a review from a team as a code owner September 12, 2024 07:35
@poljar poljar requested review from Hywan, a team and jmartinesp and removed request for a team and Hywan September 12, 2024 07:35
Copy link
Contributor

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

LGTM, there is a small typo in case you want to fix it.

bindings/matrix-sdk-crypto-ffi/src/lib.rs Outdated Show resolved Hide resolved
@poljar poljar enabled auto-merge (squash) September 12, 2024 09:46
@poljar poljar merged commit 9e7ab63 into main Sep 12, 2024
39 of 40 checks passed
@poljar poljar deleted the poljar/pk-encryption-bingings branch September 12, 2024 09:54
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.

3 participants