-
Notifications
You must be signed in to change notification settings - Fork 121
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
Disable default features for rand dep in phf_generator #263
Merged
JohnTitor
merged 1 commit into
rust-phf:master
from
lopopolo:lopopolo/rand-no-default-features
Aug 3, 2022
Merged
Disable default features for rand dep in phf_generator #263
JohnTitor
merged 1 commit into
rust-phf:master
from
lopopolo:lopopolo/rand-no-default-features
Aug 3, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These dependencies are not needed when using distributions and small_rng.
lopopolo
added a commit
to artichoke/artichoke
that referenced
this pull request
Aug 2, 2022
In MRI Ruby, `SecureRandom` is implemented with `Random::urandom` which itself is implemented with an OS-provided cryptographically secure random number source. This commit removes an intermediate CSPRNG and instead delegates directly to the host operating system for random bytes by using the `getrandom` crate-backed `OsRng` from `rand`. This allows deactivating a bunch of features in `rand` which will hopefully drop some deps if rust-phf/rust-phf#263 is accepted and Artichoke upgrades to `pfh` 0.11.0+.
lopopolo
added a commit
to artichoke/artichoke
that referenced
this pull request
Aug 2, 2022
In MRI Ruby, `SecureRandom` is implemented with `Random::urandom` which itself is implemented with an OS-provided cryptographically secure random number source. This commit removes an intermediate CSPRNG and instead delegates directly to the host operating system for random bytes by using the `getrandom` crate-backed `OsRng` from `rand`. This allows deactivating a bunch of features in `rand` which will hopefully drop some deps if rust-phf/rust-phf#263 is accepted and Artichoke upgrades to `pfh` 0.11.0+.
JohnTitor
approved these changes
Aug 3, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@JohnTitor I'm not sure how toilsome cutting a point release is, but I'd be interested in a new release that includes this PR. 🙏 |
Sure, I'll make a new release later today! |
Release v0.11.1 including this PR: https://crates.io/crates/phf_generator/0.11.1 |
Thank you! |
lopopolo
added a commit
to artichoke/artichoke
that referenced
this pull request
Aug 9, 2022
This removes dependencies on CSPRNGs from `rand` as a followup to #2040 and rust-phf/rust-phf#263. ```console $ cargo update -p phf -p phf_shared -p phf_codegen -p phf_generator Updating crates.io index Updating phf v0.11.0 -> v0.11.1 Updating phf_codegen v0.11.0 -> v0.11.1 Updating phf_generator v0.11.0 -> v0.11.1 Updating phf_shared v0.11.0 -> v0.11.1 Removing ppv-lite86 v0.2.16 Removing rand_chacha v0.3.1 ``` Part of tracking issue #2052.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These dependencies are not needed when using distributions and small_rng.