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

Use the getrandom crate to implement ring::rand. #1531

Merged
merged 1 commit into from
Oct 29, 2022
Merged

Conversation

briansmith
Copy link
Owner

No description provided.

@oliverdunk
Copy link

Silly question, per #1508 have we tested to see if this works in a worker in WASM? My experience has been that most libraries don’t handle that case.

If not I’ll give this a try!

cemeyer
cemeyer previously approved these changes Oct 25, 2022
@briansmith
Copy link
Owner Author

Silly question, per #1508 have we tested to see if this works in a worker in WASM? My experience has been that most libraries don’t handle that case.

If not I’ll give this a try!

I think if getrandom doesn't work then that's something that the getrandom crate would want to fix--and test. I filed rust-random/getrandom#319 to track that.

@gaojiaqi7
Copy link
Contributor

Can we add a feature flag for getrandom/rdrand so that it can support more x86/x86_64 targets?

@codecov
Copy link

codecov bot commented Oct 26, 2022

Codecov Report

Merging #1531 (2bdcdb2) into main (00fc3f3) will increase coverage by 1.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1531      +/-   ##
==========================================
+ Coverage   91.47%   92.48%   +1.00%     
==========================================
  Files         128      128              
  Lines       18801    18539     -262     
  Branches      195      195              
==========================================
- Hits        17198    17145      -53     
+ Misses       1568     1359     -209     
  Partials       35       35              
Impacted Files Coverage Δ
src/lib.rs 29.16% <ø> (+13.83%) ⬆️
src/rand.rs 100.00% <100.00%> (+33.72%) ⬆️
src/error.rs 54.73% <0.00%> (-31.27%) ⬇️
src/aead/less_safe_key.rs 96.89% <0.00%> (+0.77%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

4 participants