mirror of
https://github.com/servo/servo
synced 2026-05-13 18:37:30 +02:00
An in-memory RNG that shares its file descriptor. <!-- Please describe your changes on the following line: --> This PR implements an in-memory random number generator that only uses an OS RNG for (re)seeding. The OS RNG is shared, so there's only one file descriptor for `/dev/urandom` being used. The PR also implements a tidy check that we don't accidentally introduce an RNG. Rather annoyingly, there are a lot of transitive dependencies on `rand`, notably hash maps in `std`. This PR makes it possible to use uuids for identifiers such as pipeline and frame ids. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes do not require tests because it's fixing a resource issue <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14351) <!-- Reviewable:end -->