Skip to content

Use libc::getrandom on Redox - #871

Merged
newpavlov merged 4 commits into
masterfrom
redox_getrandom
Oct 30, 2026
Merged

newpavlov merged 4 commits into
masterfrom
redox_getrandom

Conversation

@newpavlov

Copy link
Copy Markdown
Member

Closes #842

@newpavlov
newpavlov requested review from dhardy and josephlr October 30, 2026 02:53

@josephlr josephlr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. I always love getting rid of a file-based backend.

Comment thread Cargo.toml

# redox
[target.'cfg(target_os = "redox")'.dependencies]
libc = { version = "0.2.190", default-features = false }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we want to update the other libc versions now? Or in a later PR?

I don't think it really matters too much if they are in sync.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think it's fine to keep the old versions. It's technically more "correct" (since the other targets do not rely on features in new libc releases) and reduces amount of busywork.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It seems that cargo is unable to select a smaller libc version if one of targets requires a higher one, so this change effectively bumps minimum version of libc for all targets.

@newpavlov
newpavlov merged commit 6a04900 into master Oct 30, 2026
80 checks passed
@newpavlov
newpavlov deleted the redox_getrandom branch October 30, 2026 10:40
@newpavlov newpavlov mentioned this pull request Oct 30, 2026
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.

Use the libc getrandom call rather than /dev/urandom on Redox OS

2 participants