rust-random / getrandom

A small cross-platform library for retrieving random data from (operating) system source
Apache License 2.0
264 stars 166 forks source link

MSRV(future): Use std::{sync::OnceLock/io::Read}` to eliminate more unsafe code & once_cell dependency. #485

Closed briansmith closed 2 weeks ago

briansmith commented 2 weeks ago

With these changes, the only unsafe in use_file is Linux/Android's use of libc::poll.

This cannot be merged as-is because it depends on unstable features. This PR is intended to demonstrate potential future directions.

briansmith commented 2 weeks ago

Closing this since it is just a PoC and can't be merged for a long time, if ever.