Closed maratik123 closed 4 months ago
It's deliberate that the wrapper doesn't support it: we reserve the right to change the implementation (and generated results) at any time, therefore it makes no sense to use this if you want reproducibility.
Use the rand_xoshiro
crate (or another) instead.
CHANGELOG.md
entrySummary
Added a
serde1
feature and addedSerialize
/Deserialize
toSmallRng
Motivation
Need to save and load random generator state on simulation to have reproducible generations. Internal implementations of SmallRng (Xoshiro256PlusPlus and Xoshiro128PlusPlus) can handle serde feature. It is strange that wrapper can not afford it.
Details
Add
#[derive(Serialize, Deserialize)]
tostruct SmallRng