smol-rs / fastrand

A simple and fast random number generator
Apache License 2.0
409 stars 35 forks source link

Add a way to seed the thread local default generator #28

Closed notgull closed 2 years ago

notgull commented 2 years ago

It would be nice to have a way to seed the RNG generator used for the module-level methods and for seeding the Rng structs by default. Maybe a seed() function or a FASTRAND_TLS_SEED environment variable.

taiki-e commented 2 years ago

a seed() function

See https://docs.rs/fastrand/latest/fastrand/fn.seed.html

notgull commented 2 years ago

Not sure how I missed that, thank you!