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

Element R: Bump matrix-rust-sdk-crypto-wasm to version 4.0.0 #4021

Merged
merged 7 commits into from
Jan 22, 2024

Conversation

BillCarsonFr
Copy link
Member

@BillCarsonFr BillCarsonFr commented Jan 22, 2024

Fixes element-hq/element-web#26900, element-hq/element-web#26714 and part of element-hq/element-web#26774

  • Source breaking change: OlmMachine init_from_store renamed as initFromStore

Side effects of matrix-org/matrix-rust-sdk-crypto-wasm#82

New thing with Vec<_> support in wasm-bindgen: it drops the items on the JS side as soon as the method is called. Basically, the ownership of the JS values are transferred to Rust.

Impacted Methods

  • shareRoomKeys - Udpated (RoomEncryptor)
  • queryKeysForUsers - Updated (userHasCrossSigningKeys)
  • getMissingSessions - Updated (KeyClaimManager))
  • updateTrackedUsers - Usage was fine
  • migrateOlmSession- no changes usage is fine
  • migrateMegolmSession - no changes usage is fine
  • DeviceList constructor - no changes usage is fine
  • requestKeyVerification, verificationRequestContent, acceptWithMethod - Ok because is just an int

This change is marked as an internal change (Task), so will not be included in the changelog.

@BillCarsonFr BillCarsonFr requested review from a team as code owners January 22, 2024 13:18
@BillCarsonFr BillCarsonFr added the T-Task Tasks for the team like planning label Jan 22, 2024
@richvdh richvdh changed the title Element R: Bump wasm bindings version 4.0.0 Element R: Bump wasm bindings to version 4.0.0 Jan 22, 2024
@richvdh richvdh changed the title Element R: Bump wasm bindings to version 4.0.0 Element R: Bump matrix-rust-sdk-crypto-wasm to version 4.0.0 Jan 22, 2024
src/rust-crypto/KeyClaimManager.ts Outdated Show resolved Hide resolved
src/rust-crypto/KeyClaimManager.ts Outdated Show resolved Hide resolved
await this.outgoingRequestProcessor.makeOutgoingRequest(request);
}
// rust layer will take ownership of rustTrackedUser and drops it from the JS side.
Copy link
Member

Choose a reason for hiding this comment

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

Not sure this is helpful?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

const userIdentity = await this.olmMachine.getIdentity(rustTrackedUser);
userIdentity?.free();
Copy link
Member

Choose a reason for hiding this comment

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

This is still required, I think

Copy link
Member Author

Choose a reason for hiding this comment

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

added back

BillCarsonFr and others added 2 commits January 22, 2024 14:44
Co-authored-by: Richard van der Hoff <[email protected]>
Co-authored-by: Richard van der Hoff <[email protected]>
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm

@richvdh richvdh added this pull request to the merge queue Jan 22, 2024
Merged via the queue into develop with commit b10a804 Jan 22, 2024
35 checks passed
@richvdh richvdh deleted the valere/element-r/bump_bindings_4.0.0 branch January 22, 2024 15:42
@richvdh richvdh linked an issue Jan 23, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Element-R: Update to matrix-sdk-crypto-wasm 4.0.0 Element-R: doesn't work in release builds
4 participants