Expand description
Utility helpers shared across canisters: formatting, time, random number generation, and WASM helpers. Each submodule provides a focused toolkit used by the ops and state layers.
Re-exports§
pub use ::canic_cdk as cdk;
Modules§
- case
- format
- Small formatting helpers shared across logs and UI responses.
- hash
- xxHash3 hashing utilities.
- instructions
- Helpers for formatting raw instruction counts into friendly strings.
- macros
- rand
- Randomness helpers built atop
tinyrand, seeded with wall-clock time. Provides a shared RNG for tests and lightweight sampling (non-cryptographic). - serialize
- MiniCBOR-powered serialization helpers ensuring deterministic codecs across canisters. Provides a thin wrapper with shared error handling for CBOR round-trips in stable structures.
- time
- Time helpers abstracting over host/IC execution so call sites can request UNIX epoch timestamps at various precisions.
- wasm
- WASM utilities such as hashing embedded modules with SHA-256.
Macros§
- impl_
storable_ bounded - Implement
Storablewith a bounded size guarantee. - impl_
storable_ unbounded - Implement
Storablewithout a size bound.