Lines Matching +full:wasm32 +full:- +full:unknown +full:- +full:emscripten
6 //! | ----------------- | ------------------ | --------------
10 //! | iOS, tvOS, watchOS | `*‑apple‑ios`, `*-apple-tvos`, `*-apple-watchos` | [`CCRandomGenerateByt…
19 //! | Hermit | `*-hermit` | [`sys_read_entropy`]
20 //! | Hurd | `*-hurd-*` | [`getrandom`][17]
23 //! | ESP-IDF | `*‑espidf` | [`esp_fill_random`]
24 //! | Emscripten | `*‑emscripten` | [`getentropy`][13]
25 //! | WASI | `wasm32‑wasi` | [`random_get`]
26 //! | Web Browser and Node.js | `wasm*‑*‑unknown` | [`Crypto.getRandomValues`] if available, then […
27 //! | SOLID | `*-kmc-solid_*` | `SOLID_RNG_SampleRandomBytes`
28 //! | Nintendo 3DS | `armv6k-nintendo-3ds` | [`getrandom`][1]
29 //! | PS Vita | `armv7-sony-vita-newlibeabihf` | [`getentropy`][13]
30 //! | QNX Neutrino | `*‑nto-qnx*` | [`/dev/urandom`][14] (identical to `/dev/random`)
31 //! | AIX | `*-ibm-aix` | [`/dev/urandom`][15]
59 //! [`wasm32-wasi`](https://github.com/CraneStation/wasi) and
60 //! [`wasm32-unknown-emscripten`](https://www.hellorust.com/setup/emscripten/)
61 //! targets. However, the `wasm32-unknown-unknown` target (i.e. the target used
62 //! by `wasm-pack`) is not automatically
70 //! [described above](#supported-targets) using the [`wasm-bindgen`] toolchain.
87 //! This feature has no effect on targets other than `wasm32-unknown-unknown`.
92 //! limitations in wasm-bindgen's [`module`] support, we cannot directly
133 //! entropy yet. To avoid returning low-entropy bytes, we first poll
153 //! [1]: http://man7.org/linux/man-pages/man2/getrandom.2.html
154 //! [2]: http://man7.org/linux/man-pages/man4/urandom.4.html
155 //! [3]: https://www.unix.com/man-page/mojave/2/getentropy/
156 //! [4]: https://www.unix.com/man-page/mojave/4/urandom/
157 //! [5]: https://www.freebsd.org/cgi/man.cgi?query=getrandom&manpath=FreeBSD+12.0-stable
161 //! [9]: https://leaf.dragonflybsd.org/cgi/web-man?command=getrandom
162 //! [10]: https://leaf.dragonflybsd.org/cgi/web-man?command=random§ion=4
163 //! [11]: https://docs.oracle.com/cd/E88353_01/html/E37841/getrandom-2.html
164 //! [12]: https://docs.oracle.com/cd/E86824_01/html/E54777/random-7d.html
165 //! [13]: https://github.com/emscripten-core/emscripten/pull/12240
167 //! [15]: https://www.ibm.com/docs/en/aix/7.3?topic=files-random-urandom-devices
169 //! [17]: https://www.gnu.org/software/libc/manual/html_mono/libc.html#index-getrandom
171 //! [`BCryptGenRandom`]: https://docs.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcrypt…
172 //! [`Crypto.getRandomValues`]: https://www.w3.org/TR/WebCryptoAPI/#Crypto-method-getRandomValues
173 …AND`]: https://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-softwa…
174 //! [`CCRandomGenerateBytes`]: https://opensource.apple.com/source/CommonCrypto/CommonCrypto-60074/…
175 //! [`cprng_draw`]: https://fuchsia.dev/fuchsia-src/zircon/syscalls/cprng_draw
176 …`crypto.randomFillSync`]: https://nodejs.org/api/crypto.html#cryptorandomfillsyncbuffer-offset-size
177 //! [`esp_fill_random`]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/…
178 ….com/WebAssembly/WASI/blob/main/phases/snapshot/docs.md#-random_getbuf-pointeru8-buf_len-size---er…
179 //! [WebAssembly support]: #webassembly-support
180 //! [`wasm-bindgen`]: https://github.com/rustwasm/wasm-bindgen
181 //! [`module`]: https://rustwasm.github.io/wasm-bindgen/reference/attributes/on-js-imports/module.h…
184 …tropy`]: https://github.com/hermit-os/kernel/blob/315f58ff5efc81d9bf0618af85a59963ff55f8b1/src/sys…
187 html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
188 html_favicon_url = "https://www.rust-lang.org/favicon.ico",
212 // System-specific implementations.
215 // `fn getrandom_inner(dest: &mut [MaybeUninit<u8>]) -> Result<(), Error>`.
242 #[path = "apple-other.rs"] mod imp;
249 } else if #[cfg(all(target_arch = "wasm32", target_os = "wasi"))] {
270 } else if #[cfg(target_os = "emscripten")] {
272 #[path = "emscripten.rs"] mod imp;
281 any(target_arch = "wasm32", target_arch = "wasm64"),
282 target_os = "unknown"))] {
289 } else if #[cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"),
290 target_os = "unknown"))] {
291 compile_error!("the wasm*-unknown-unknown targets are not supported by \
294 https://docs.rs/getrandom/#webassembly-support");
297 https://docs.rs/getrandom/#unsupported-targets");
312 /// significantly slower than a user-space CSPRNG; for the latter consider
315 pub fn getrandom(dest: &mut [u8]) -> Result<(), Error> { in getrandom()
317 // `getrandom_uninit` guarantees it will never de-initialize any part of in getrandom()
331 /// No part of `dest` will ever be de-initialized at any point, regardless
339 /// # fn main() -> Result<(), getrandom::Error> {
345 pub fn getrandom_uninit(dest: &mut [MaybeUninit<u8>]) -> Result<&mut [u8], Error> { in getrandom_uninit()