Cargo Features

rand_core has no features set by default.

[dependencies]
rand_core = { version = "0.9.0-alpha.2", features = ["std", "alloc", "serde", "getrandom"] }
std = alloc

Enables std of optional getrandom

getrandom:

Implement std-only traits for getrandom::Error

Affects rand_core::TryRngCore.read_adapter, rand_core::RngReadAdapter

alloc std?

enables Vec and Box support without std

serde

enables serde for BlockRng wrapper

Enables serde

Features from optional dependencies

getrandom implicit feature

Enables getrandom

getrandom:

A small cross-platform library for retrieving random data from system source

Affects rand_core::SeedableRng.from_os_rng, rand_core::SeedableRng.try_from_os_rng