Cargo Features

getrandom has no features set by default.

[dependencies]
getrandom = { version = "0.4.0-rc.0", features = ["std", "wasm_js", "sys_rng"] }
std

Implement From<getrandom::Error> for std::io::Error and use std to retrieve OS error descriptions

wasm_js

Optional backend: wasm_js
This flag enables the wasm_js backend and uses it by default on wasm32 where the target_os is unknown. The getrandom_backend cfg may override this.
WARNING: It is highly recommended to enable this feature only for binary crates and tests,
i.e. avoid unconditionally enabling it in library crates.

Enables js-sys and wasm-bindgen

sys_rng

Provide SysRng over rand_core

Enables rand_core