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

wasm32: Unify error codes and implementations #146

Merged
merged 1 commit into from
May 25, 2020

Conversation

josephlr
Copy link
Member

Right now, while our implementations for stdweb and wasm-bindgen use
similar APIs, they do not use similar implementations. This change:

  • Switches to using the same error codes for both implementations
  • Uses error codes that detail exactly what API is missing
  • Cleans up the implemetnations to make them much more readable
  • Consitantly use thread_local in both implementations

This makes issues easier to debug and the code easier to understand.

Signed-off-by: Joe Richey joerichey@google.com

@josephlr josephlr requested review from dhardy and newpavlov May 22, 2020 23:34
@josephlr josephlr added this to the 0.2 milestone May 22, 2020
@josephlr josephlr mentioned this pull request May 22, 2020
9 tasks
@josephlr josephlr changed the title wasm32: Unify error codes an implementations wasm32: Unify error codes and implementations May 23, 2020
@josephlr
Copy link
Member Author

@dhardy I fixed the CI issue, this is ready for review.

@dhardy
Copy link
Member

dhardy commented May 25, 2020

Sorry, I'd rather not review this myself. Could I ask @zer0x64 or @Pauan to give this a review?

Copy link
Contributor

@Pauan Pauan left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Right now, while our implementations for stdweb and wasm-bindgen use
similar APIs, they do not use similar implementations. This change:

  - Switches to using the same error codes for both implementations
  - Uses error codes that detail exactly what API is missing
  - Cleans up the implemetnations to make them much more readable
  - Consitantly use thread_local in both implementations

This makes issues easier to debug and the code easier to understand.

Signed-off-by: Joe Richey <joerichey@google.com>
@josephlr josephlr merged commit a29180a into rust-random:0.2 May 25, 2020
@josephlr josephlr deleted the error branch May 25, 2020 20:20
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.

None yet

3 participants