Skip to content

OsRng crate? (or optional PRNG dependencies) #648

Closed
@tarcieri

Description

@tarcieri

rand 0.6 seems to have split all of the PRNGs into their own separate crates.

However, these crates are mandatory dependencies of the rand crate, which is still home to OsRng.

I think it'd be great if one of two things happened:

  • OsRng were split into its own crate which is only dependent on rand_core
  • The rand crate provided cargo features for the numerous PRNGs so I don't need to pull them into my project when all I want is OsRng.

Sidebar: I'm a little confused why rand and rand_core both exist. It would personally make more sense to me if rand contained the core traits, and anyone wanting an RNG can pick a crate with the one they want which only depends on rand. It seems like right now rand is both a facade and the sole home of OsRng

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-questionParticipation: opinions wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions