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

feat!: export core Error to WASM and update browser Client creation API #451

Merged
merged 7 commits into from
Jul 3, 2023

Conversation

Ma233
Copy link
Member

@Ma233 Ma233 commented Jul 2, 2023

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added / updated (for bug fixes / features)

🔵 What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  1. chore: change module name rings_core::err to rings_core::error to obey the naming convention of other crates.
  2. feature: implement Into<JsValue> for core Error to achieve exporting function that return a Result include it.
  3. chore: Since Result<T, rings_core::Error> is exportable, we exported build method of SessionManagerBuilder. And we also updated the creation API of browser Client.

🟤 What is the current behavior? (You can also link to an open issue here)

When creating browser Client, user have to pass in SessionManagerBuilder rather than SessionManager as parameter.

🟢 What is the new behavior (if this is a feature change)?

They can build SessionManager and pass it as parameter.

☢️ Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Yes, user have to update browser Client creation parameter.

ℹ️ Other information

Closes #446

@Ma233 Ma233 merged commit 9c40586 into RingsNetwork:master Jul 3, 2023
@Ma233 Ma233 deleted the error branch July 3, 2023 08:52
@Ma233 Ma233 changed the title feature!: export core Error to WASM and update browser Client creation API feat!: export core Error to WASM and update browser Client creation API Jul 13, 2023
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.

Export Result<T, rings_core::err::Error> to wasm
2 participants