Comments (2)
This is (probably) going to be addressed in #109
Depending on timing (and dev availability) getrandom 0.2
will come out before rand 0.8
. In that case, if you're using getrandom
or rand
on wasm/stdweb, you will have to set a Custom RNG. The setup should seem familiar if you've ever used a Custom Allocator.
In practice, you would have the following Cargo.toml
dependencies:
stdweb = "0.4.20"
getopts = "0.2"
rand = "0.8"
stdweb-getrandom = "0.1"
easy_reader = "0.5.0"
yew = { path = "../.." }
You would also need to have the following code in your crate/binary (to prevent linking issues):
use stdweb_getrandom as _;
We will document all of this as part of getrandom 0.2
and the transition doc or rand 0.8
.
from getrandom.
Depending on timing (and dev availability) getrandom 0.2 will come out before rand 0.8
Probably, but I think it doesn't matter? Rand 0.8 will then depend on getrandom
0.2 and must document this, while 0.7 will continue to depend on 0.1.
If getrandom
0.1 gets a shim over 0.2 then the feature flags can opt-in to stdweb_getrandom
etc. (only an issue if both stdweb
and wasm-bindgen
features are used); if not, then both will exist side-by-side.
Summary: no loss of functionality, just a different interface.
(I think there's no reason we can't close this?)
from getrandom.
Related Issues (20)
- Failed to build for wasm32-unknown-unknown with no_std HOT 1
- Is the ESPIDF implementation actually correct? HOT 3
- Spurious failures of Web tests on Windows HOT 1
- Port from libc to rustix HOT 7
- Remove file-based RNG fallback on DragonflyBSD HOT 1
- man7 link should be replaced
- The newly updated version "0.2.13" cannot run on mipsel HOT 7
- Error: target is not supported (cargo build-bpf) HOT 2
- Remove fallback logic for FreeBSD
- Investigate removing fallback logic for Solaris/Illumos HOT 1
- Windows: Switch to using ProcessPRNG by default. HOT 31
- `libc` `v0.2.154` yanked HOT 2
- Support `x86_64-unknown-linux-none` HOT 32
- Implementation of `dlsym`-based `Weak` is not sandbox-friendly HOT 6
- Use VM to run tests
- Release 0.3? HOT 8
- Document and Test that `getrandom()` never panics. HOT 3
- Feature handing changes HOT 2
- API Changes HOT 6
- Run `cargo clippy` in CI for all targets
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from getrandom.