-
Notifications
You must be signed in to change notification settings - Fork 421
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
Using a self-seeded RNG on wasm32-unknown-unknown #1249
Comments
Note: If this is only a documentation problem, I'm happy to help fixing that. If it needs larger refactorings, let's see what we can do. |
It's just a doc issue; it works fine (just disable default features). Here I used |
I tried to use |
Sorry, missed about disabling the default features; I was a bit hurry yesterday, so sorry about the noise! |
Thanks, closing this! |
Compile issue
Problem: There should be a way to use
rand
without system/environment dependencies.Quick solution: Roll my own algorithm with multiplications, modulos and bitshifts. (It did the job but not too well.)
Details: As the README says, "The WASM target
wasm32-unknown-unknown
is not automatically supported". However, for things like simulation purposes, self-seeded RNGs are warranted, and as the rust-random project has a bunch of well-vetted, well-documented random algorithms plus a lot of supporting APIs, it would be great if there was a well-documented way to use them onwasm32-unknown-unknown
and in other context that can't assume anything about the environment. Currently the documentation assumes that you want to get system-seeded random numbers withgetrandom
, which isn't necessarily true.The text was updated successfully, but these errors were encountered: