Cargo Features

getrandom has no features set by default.

[dependencies]
getrandom = { version = "0.3.1", features = ["std", "rustc-dep-of-std", "wasm_js"] }
std

Implement std::error::Error for getrandom::Error and use std to retrieve OS error descriptions

rustc-dep-of-std

Unstable feature to support being a libstd dependency

Enables compiler_builtins and rustc-std-workspace-core

compiler_builtins:

When built as part of libstd

wasm_js

Optional backend: wasm_js
This flag enables the backend but does not select it. To use the backend, use this flag *and* set getrandom_backend=wasm_js (see README).

Enables js-sys and wasm-bindgen