-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 getentropy(2) on macos #70207
Use getentropy(2) on macos #70207
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This seems to be what the getrandom crate does as of rust-random/getrandom#46, and since we're using it just for seeding hashmap randomness (i.e., not for generating entropy in an ongoing fashion) it seems to fit the use case described in the API. However, I'm relatively unfamiliar with this side of libstd, so another reviewer would be good. Perhaps @LukasKalbertodt? Not sure who we have who is familiar with this... |
I'm really sorry, but I don't think I can reasonably review this PR either (I've never worked with MacOS, for one). To avoid reassigning a bunch of times still: @rust-lang/libs @RalfJung Can anyone of you review this PR? Thanks :) |
I have never used a macOS system, so... I don't think I can give good feedback here.^^ I agree with what @Mark-Simulacrum said. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation looks good to me and matches what the popular getrandom crate has been using for the past 9 months.
@bors r+ |
📌 Commit 61ef72f has been approved by |
Use getentropy(2) on macos resolves rust-lang#70179
Rollup of 9 pull requests Successful merges: - rust-lang#69251 (#[track_caller] in traits) - rust-lang#69880 (miri engine: turn error sanity checks into assertions) - rust-lang#70207 (Use getentropy(2) on macos) - rust-lang#70227 (Only display definition when suggesting a typo) - rust-lang#70236 (resolve: Avoid "self-confirming" import resolutions in one more case) - rust-lang#70248 (parser: simplify & remove unused field) - rust-lang#70249 (handle ConstKind::Unresolved after monomorphizing) - rust-lang#70269 (remove redundant closures (clippy::redundant_closure)) - rust-lang#70270 (Clean up E0449 explanation) Failed merges: r? @ghost
resolves #70179