Skip to content

Viability of a getrandom feature? #30

@silverstillisntgold

Description

@silverstillisntgold

Hello, awesome library! Was combing through it's internals and noticed you currently use thread-local/atomic pointer addresses for seeding the RandomState/SeedableRandomState types. What are your thoughts on providing a getrandom feature to toggle delegating that to the OS-provided RNG?

Most pressing issue I can see this raising is how to deal with the error handling, but it looks like the tracking issue for something like this being introduced in std is trending towards just panicking on failure. This is also the approach go settled on a while back.

It may be worth it to investigate how the API could be altered to allow for a seeding process that might fail, since that should make it easier to move to whatever failing RNG API core will eventually provide (assuming that's something you plan to do).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions