Open Nemo157 opened 3 years ago
Correct. rand_pcg
should be removed. rand_chacha
and rand_hc
are both optional.
The reason for that graph is to talk about the total dependencies — we had some suggestions that rand
had too many a while back.
So what should we do — point out that some of these are private?
Ah, my impression from the initial prose was that the page was more about showing the relationships between the family of crates, not the actual dependency graph. As a private implementation detail I don't see that it's useful for users to know that rand
depends on rand_chacha
to provide its StdRng
, and would have just gone for a graph like
getrandom ┐
└ rand_core ┐
├ rand ┐
│ ├ rand_distr
│ └ statrs
├ rand_chacha
├ rand_hc
├ rand_pcg
└ rand_xoshiro
(and would extend it to include all the rust-random maintained crates).
Sounds reasonable. @vks do you agree?
I think we can go ahead and do this. Like to make a PR @Nemo157 ?
I agree it makes sense to omit private dependencies, and to update the graph with the other Rand crates.
Based on the dependency graph on https://rust-random.github.io/book/crates.html it looks like
rand
provides access torand_chacha
. While, according to https://docs.rs/rand/0.8.3/rand/rngs/struct.StdRng.html,rand_chacha
is actually a private dependency ofrand
, and if you want access to the chacha family of PRNGs you should depend onrand_chacha
yourself, similar torand_distr
. (I assume similar forrand_pcg
/rand_hc
, and I thinkrand_pcg
actually even isn't a dependency ofrand
anymore).