Skip to main content

ic_storage/
lib.rs

1#![deny(unsafe_code, unsafe_op_in_unsafe_fn)]
2#![deny(rustdoc::broken_intra_doc_links)]
3#![doc = include_str!("../README.md")]
4
5/// Governed collections over checked named allocations and upstream codecs.
6pub mod adapter;
7mod hash;
8mod key;
9mod map_engine;
10mod memory;
11mod runtime;
12mod stable_cell;
13#[cfg(feature = "test-support")]
14pub mod testing;
15
16use ic_platform::stable_structures as substrate;
17pub use substrate::storable;
18
19pub use key::{StableKey, StableKeyError};
20pub use memory::{BackingIdentity, DefaultMemoryImpl, Memory, VectorMemory};
21pub use runtime::*;
22pub use stable_cell::{
23    STABLE_CELL_HEADER_SIZE, StableCellPayloadError, stable_cell_payload_length,
24};
25
26/// WebAssembly stable-memory page size in bytes.
27pub const WASM_PAGE_SIZE_BYTES: u64 = 65_536;