Skip to content

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

Merged
briansmith merged 1 commit into
mainfrom
b/getrandom
Oct 29, 2022
Merged

briansmith merged 1 commit into
mainfrom
b/getrandom

Conversation

@briansmith

Copy link
Copy Markdown
Owner

No description provided.

@oliverdunk

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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

@codecov

codecov Bot commented Oct 26, 2022 •

Copy link
Copy Markdown

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