vdso-rng-0.2.0 has been yanked.
vDSO-RNG
A Rust wrapper around the Linux vDSO random number generator.
Unfortunately, rustix does not currently expose sufficient APIs to access getrandom via vDSO.
This crate provides an alternative, dependency-free wrapper for such functionality, without relying on libc.
Overview
This crate provides two key data structures:
- [
Pool]: A synchronous, thread-safe state pool for managing shared vDSO random state. - [
LocalState]: A thread-local state object rented from the pool, used for generating random bytes.
Example: Global Setup
To set up the random generator globally, you can use the following pattern:
use RefCell;
use ;
Safety
For safety considerations, including async-signal-safety and fork behavior, please refer to the documentation for:
- [
Pool] - [
LocalState]