{"action":"created","issue":{"url":"https://api.github.com/repos/rust-random/rand/issues/648","repository_url":"https://api.github.com/repos/rust-random/rand","labels_url":"https://api.github.com/repos/rust-random/rand/issues/648/labels{/name}","comments_url":"https://api.github.com/repos/rust-random/rand/issues/648/comments","events_url":"https://api.github.com/repos/rust-random/rand/issues/648/events","html_url":"https://github.com/rust-random/rand/issues/648","id":382932279,"node_id":"MDU6SXNzdWUzODI5MzIyNzk=","number":648,"title":"`OsRng` crate? (or optional PRNG dependencies)","user":{"login":"tarcieri","id":797,"node_id":"MDQ6VXNlcjc5Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/797?v=4","gravatar_id":"","url":"https://api.github.com/users/tarcieri","html_url":"https://github.com/tarcieri","followers_url":"https://api.github.com/users/tarcieri/followers","following_url":"https://api.github.com/users/tarcieri/following{/other_user}","gists_url":"https://api.github.com/users/tarcieri/gists{/gist_id}","starred_url":"https://api.github.com/users/tarcieri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarcieri/subscriptions","organizations_url":"https://api.github.com/users/tarcieri/orgs","repos_url":"https://api.github.com/users/tarcieri/repos","events_url":"https://api.github.com/users/tarcieri/events{/privacy}","received_events_url":"https://api.github.com/users/tarcieri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-21T02:47:55Z","updated_at":"2018-11-22T10:10:08Z","closed_at":null,"author_association":"NONE","body":"`rand` 0.6 seems to have split all of the PRNGs into their own separate crates.\r\n\r\nHowever, these crates are mandatory dependencies of the `rand` crate, which is still home to `OsRng`.\r\n\r\nI think it'd be great if one of two things happened:\r\n\r\n- `OsRng` were split into its own crate which is only dependent on `rand_core`\r\n- 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`.\r\n\r\nSidebar: 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`"},"comment":{"url":"https://api.github.com/repos/rust-random/rand/issues/comments/440979456","html_url":"https://github.com/rust-random/rand/issues/648#issuecomment-440979456","issue_url":"https://api.github.com/repos/rust-random/rand/issues/648","id":440979456,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MDk3OTQ1Ng==","user":{"login":"dhardy","id":134893,"node_id":"MDQ6VXNlcjEzNDg5Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/134893?v=4","gravatar_id":"","url":"https://api.github.com/users/dhardy","html_url":"https://github.com/dhardy","followers_url":"https://api.github.com/users/dhardy/followers","following_url":"https://api.github.com/users/dhardy/following{/other_user}","gists_url":"https://api.github.com/users/dhardy/gists{/gist_id}","starred_url":"https://api.github.com/users/dhardy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhardy/subscriptions","organizations_url":"https://api.github.com/users/dhardy/orgs","repos_url":"https://api.github.com/users/dhardy/repos","events_url":"https://api.github.com/users/dhardy/events{/privacy}","received_events_url":"https://api.github.com/users/dhardy/received_events","type":"User","site_admin":false},"created_at":"2018-11-22T10:10:08Z","updated_at":"2018-11-22T10:10:08Z","author_association":"MEMBER","body":"@naftulikay run `cargo bench --bench generators` to get some numbers :smiley: (though apparently ChaCha should be faster; you can see though that CSPRNGs are not slow)\r\n\r\nOur `thread_rng` does periodic reseeding, and also has fork protection on UNIX. As most things security, there are compromises to make, and we choose to compromise such that performance is barely affected."}}
{"actor":{"display_login":"dhardy"}}