-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-export rand-core
members in rand
?
#15
Comments
It is also worth mentioning the story for crates implementing |
Not re-exporting Could you explain why the |
I put |
Ok, I moved |
The re-exports seem fine to me. I still like to look over |
I know this messes up the crate separation, but did you consider
Would that eliminate needing |
I don't believe it would eliminate the need to Good point about this being a breaking change; I don't see an obvious way around it though (also the crate separation is quite important IMO). |
Right, if that existed it'd require an extra |
Like class extension in classic OO languages? Yes, but I don't think anything like that exists in Rust. |
I think it would be a really good exercise to write down the complete desired interfaces for both Edit: Public interface. I don't care about internal details for the purposes of this comment. |
Check out the documentation: https://dhardy.github.io/rand/ |
Important to this topic are: which other parts of
There are more subdivisions possible, although these appear less useful:
Finally, Conclusion
Re-exports
|
I think this topic is either decided or will be reviewed later, so closing the issue. |
Since
rand-core
is intended to be a separate crate, but withrand
depending on it, should some parts of be re-exported inrand
?I argue that the following should be re-exported in
rand
so that "normal users" do not have to depend onrand-core
:Rng
,CryptoRng
,SeedableRng
,SeedFromRng
traitsError
struct andErrorKind
enumThe
rand_core::impls
module is aimed at implementations ofRng
so does not need to be re-exported (in my opinion).There is one other item: themock
module. Probably it is useful to re-export this fromrand
.The text was updated successfully, but these errors were encountered: