You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We may want to make rand optional, or directly expose RNG seeding through the API before upgrading to rand 0.9; that bumps getrandom to 0.3, which is more difficult to get working on WASM. (getrandom is an annoyingly painful dependency to manage.)
It should be straightforward to split load_random (and load_math) into variants that initialize from a seed and variants that use OS apis, and put the ones that require getrandom behind a feature flag. I may go and fix that at some point when I have time, but until then I'm personally stuck on rand 0.8.
Would making the rng an argument be a path we'd want to go down?
Different applications might want different random number properties, and then we could turn off all default features, and have a feature that provides the old load_math interface with os-seeded rng.
We may want to make rand optional, or directly expose RNG seeding through the API before upgrading to rand 0.9; that bumps getrandom to 0.3, which is more difficult to get working on WASM. (getrandom is an annoyingly painful dependency to manage.)
It should be straightforward to split load_random (and load_math) into variants that initialize from a seed and variants that use OS apis, and put the ones that require getrandom behind a feature flag. I may go and fix that at some point when I have time, but until then I'm personally stuck on rand 0.8.
I haven't been having too many problems after sticking
into .cargo/config.toml relative to the crate I want to compile for wasm (along with the feature addition in Cargo.toml)
EDIT: they tell you this on the crate docs page ignore me
This file contains hidden or 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
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.
Bump code to use rand 0.9 by translating API calls:
gen*->random*from_entropy->from_os_rng