Skip to content

Stable Structures

TODO: Write content for this page.

Use stable data structures in Rust canisters for upgrade-safe storage. Cover StableBTreeMap, StableVec, StableCell, MemoryManager for multiple data structures, when to use stable vs heap storage, and migration patterns between stable structure versions. Include practical examples for common patterns (key-value store, user records, counters).

  • guides/backends/data-persistence — general persistence guide
  • concepts/orthogonal-persistence — conceptual background
  • guides/canister-management/lifecycle — upgrades and stable memory