Skip to content
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

Make it possible to not import specific generators #965

Closed
dbdr opened this issue Apr 11, 2020 · 5 comments
Closed

Make it possible to not import specific generators #965

dbdr opened this issue Apr 11, 2020 · 5 comments

Comments

@dbdr
Copy link
Contributor

dbdr commented Apr 11, 2020

Background

I'm using rand for numerical simulations where cryptographic security is not required, while runtime speed and binary size are important. SmallRng is appropriate for my use. My issue is that chacha and hc are still downloaded and compiled even though I don't use them, wasting time and space. It would be useful if it was possible to use SmallRng with rand without pulling the other generators.

Feature request

Make chacha and hc optional features (they can be enabled by default if that's deemed desirable for most users).

@dbdr dbdr changed the title Make it possible to not import specific implementations Make it possible to not import specific generators Apr 11, 2020
@dhardy
Copy link
Member

dhardy commented Apr 11, 2020

This is a duplicate of #938 and already fixed by #948, so it should already happen with rand 0.8 (with --no-default-features).

@dbdr
Copy link
Contributor Author

dbdr commented Apr 12, 2020

Oh, wonderful, thanks @dhardy. I searched for an existing issue, but not in closed issues, as is the default search. That's one argument for keeping issues open until the fix is released. Is there a stronger reason to close them?

I'll try 0.8 from git and report if I find any issue.

@vks
Copy link
Collaborator

vks commented Apr 13, 2020

I think most projects close issues that are fixed on master. This is consistent with GitHub automatically closing issues when "Fixes #..." is mentioned in the pull request. It seems prudent to search closed issues when a version older than the current master is used.

@dbdr
Copy link
Contributor Author

dbdr commented Apr 13, 2020

Isn't a released version always older than master, unless nothing has been committed since release? :)
Anyways, that make sense, thanks for the explanation. Closing.

@dbdr dbdr closed this as completed Apr 13, 2020
@dhardy
Copy link
Member

dhardy commented Apr 13, 2020

Some projects use separate development and master branches. We don't, and it seems neither do most Rust projects, so master is where it happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants