ic-dummy-getrandom-for-wasm 0.1.0

Workaround a problem with rand on wasm32-unknown-unknown targets
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
ic-dummy-getrandom-for-wasm
=============================

The `rand` crate is widely used in the Rust ecosystem. The `rand` crate in turn
relies on `getrandom` to acquire cryptographic seed material. For policy
reasons, `getrandom` refuses to compile on the `wasm32-unknown-unknown` target
used by the Internet Computer. This prevents using `rand` without workarounds.

This crate implements such a workaround; on `wasm32-unknown-unknown` target, it
registers a custom getrandom implementation which just returns an error at
runtime. On any other target, it does nothing.