Skip to main content

ic_memory

Macro ic_memory 

Source
macro_rules! ic_memory {
    ($label:path, $id:expr) => { ... };
}
Expand description

Declare a stable-memory slot backed by the Canic memory registry.

The macro registers a declaration descriptor for lifecycle bootstrap validation during process startup. Evaluating the macro expression returns the VirtualMemory handle only after bootstrap has validated the sealed declaration snapshot. Memory IDs are automatically namespaced per crate via CARGO_PKG_NAME.