Skip to main content

Module seed

Module seed 

Source
Expand description

Stable, deterministic seed derivation for synthetic data generation.

Every value the generator produces must be reproducible from a single root seed, independent of when or in what order it is requested during a traversal. We get that by deriving a dedicated RNG stream per logical identity (a table, a column, a planner, or an operator invocation) via SHA-256 over a fixed, length-prefixed byte layout.

std::collections::hash_map::DefaultHasher and ahash are deliberately not used here: neither publishes a stability guarantee across Rust or crate versions, so a toolchain upgrade could silently reshuffle every generated dataset. SHA-256 is a fixed, versioned algorithm we control.

Structs§

SeedRoot
A run’s single root seed, from which every deterministic stream is derived.
StreamId
Identity of a single deterministic RNG stream.

Functions§

derive_seed
Derive a 32-byte seed from a root value and an ordered list of identity parts.