-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Use getrandom crate #62082
Closed
Closed
Use getrandom crate #62082
Changes from 5 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
28ac843
use getrandom crate
newpavlov 621ef04
transmute fix
newpavlov 98be6f7
use from_ne_bytes instead of transmute
newpavlov 79ffb24
remove comment
newpavlov 26a1108
use transmute_copy
newpavlov 66e799d
Update src/libstd/sys/windows/pipe.rs
newpavlov b6c7673
Update src/libstd/sys/windows/pipe.rs
newpavlov 0056e1d
ignore only Error::UNAVAILABLE, use u128::from_ne_bytes to remove unsafe
newpavlov 67ea529
whitelist wasm32-unknown-unknown target, update Cargo.lock
newpavlov e6d3ed3
use => {}
newpavlov 568e492
Merge branch 'master' into getrandom
newpavlov 560dd3e
Merge branch 'master' into getrandom
newpavlov 0a63f37
merge master
newpavlov 7ac37e2
update Cargo.lock
newpavlov facdc28
enable rustc-dep-of-std for getrandom
newpavlov 5d0ae59
wasm32-unknown-unknown exception
newpavlov 1fdf620
remove bcrypt linking
newpavlov f94d928
fix Cargo.toml
newpavlov dd9af37
add wasi to whitelist
newpavlov 4f3e2a0
add tidy check exception
newpavlov 93c89fe
remove unused import
newpavlov f584f92
remove unused extern fns
newpavlov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
This file was deleted.
Oops, something went wrong.
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.
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.
Caveat: this won't work on bare WASM since
getrandom
currently requires a feature flag to enable eitherstdweb
orwasm_bindgen
. There was mention of makingwasm_bindgen
the default; we might want to do this first?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.
Personally I would prefer if a separate target will be introduced and
wasm32-unknown-wunknown
will stay assumptions-free regarding executor environment.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.
IIUC without enabled
stdweb
orwasm_bindgen
features outside of WASI and Emscripten it will use a dummy impl, so it will work in the same way as it does today by using a constant seed value.