Skip to content

removing from_entropy from SmallRng breaks what i think is a common usage #1443

@tenturestept

Description

@tenturestept

Background

What is your motivation?

i want to use rand for regular random numbers in a simple game. i don't want to bloat the executable size with a chacha-based rng so i use only features = ["std", "small_rng", "getrandom"].

in 1db3aa4, SmallRng stopped impling SeedableRng and lost the from_entropy factory method.

for me it was very convenient to have SmallRng seedable from getrandom using from_entropy. the from_thread_rng method is not useful since i don't enable the std_rng feature.

i think removing from_entropy breaks a common use-case. that is:

  1. i want basic random numbers.
  2. i don't care about reproducibility, i.e. they should be different every execution.
  3. i want minimal compile times and code size.

obviously i can easily seed it myself using the getrandom crate but the previous situation was easier.

What type of application is this? (E.g. cryptography, game, numerical simulation)

game

Feature request

bring back from_entropy?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions