ThreadRng adds some thread-local memory. In case not all users want this, we could add a thread_rng feature flag (probably default-enabled). We have a thread_rng feature in v0.9.
Where the thread_rng feature is not enabled, rand::rngs::ThreadRng would not be available. rand::rng() could instead use OsRng (assuming that getrandom is available), thus the thread_rng feature would mostly be a performance boost (at the cost of extra code and thread-local memory).
ThreadRngadds some thread-local memory.In case not all users want this, we could add aWe have athread_rngfeature flag (probably default-enabled).thread_rngfeature in v0.9.Where the
thread_rngfeature is not enabled,rand::rngs::ThreadRngwould not be available.rand::rng()could instead useOsRng(assuming thatgetrandomis available), thus thethread_rngfeature would mostly be a performance boost (at the cost of extra code and thread-local memory).