Skip to content

Use getrandom for randomness #110

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

Merged
merged 1 commit into from
Mar 26, 2025
Merged

Conversation

ChrisDenton
Copy link
Member

The reason getrandom isn't currently used is given by:

// Note that we ideally would use the `getrandom` crate, but unfortunately
// that causes build issues when this crate is used in rust-lang/rust (see
// rust-lang/rust#65014 for more information). As a result we just inline
// the pretty simple Windows-specific implementation of generating
// randomness.
fn getrandom(dest: &mut [u8]) -> io::Result<()> {
which says getrandom can't be used due to rust-lang/rust#65014 which was closed as an instance of rust-lang/cargo#4866 which is closed in favour of a nightly cargo feature rust-lang/cargo#7915 which has since been stabilised.

So I think we're good now.

Verified

This commit was signed with the committer’s verified signature.
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

Reasonable. Thanks!

@weihanglo weihanglo merged commit 9358531 into rust-lang:main Mar 26, 2025
15 checks passed
@ChrisDenton ChrisDenton deleted the getrandom branch March 27, 2025 01:43
@clubby789
Copy link

@weihanglo Would it be possible to get a new release of jobserver with this? It should unblock this dependency bump

@weihanglo weihanglo mentioned this pull request Apr 1, 2025
@weihanglo
Copy link
Member

jobserver@0.1.33 is out.

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