# Saving and restoring the state of a SeedableRng

**URL:** <https://users.rust-lang.org/t/saving-and-restoring-the-state-of-a-seedablerng/52642>\
**Category:** help\
**Created:** [December 11, 2020, 3:31pm UTC](https://users.rust-lang.org/t/saving-and-restoring-the-state-of-a-seedablerng/52642 "2020-12-11T15:31:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mbrubeck](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/mbrubeck/32/648_2.png) [@mbrubeck](https://users.rust-lang.org/u/mbrubeck)\
**Post date:** [December 11, 2020, 5:11pm UTC](https://users.rust-lang.org/t/saving-and-restoring-the-state-of-a-seedablerng/52642/2 "2020-12-11T17:11:16Z")

</div>

The [rand\_pcg](https://crates.io/crates/rand_pcg) crate, if its optional `"serde"` feature is enabled, has SeedableRng types that can be serialized to (and deserialized from) any format with [serde](https://serde.rs/) support.

---

_[View the full topic](https://users.rust-lang.org/t/saving-and-restoring-the-state-of-a-seedablerng/52642)._
