Expand description
Canic facade crate.
This crate is the recommended dependency for downstream canister projects. It re-exports the core Canic stack and provides the common macro entry points:
build!/build_root!forbuild.rs(validate/embedcanic.toml)start!/start_root!forlib.rs(wire lifecycle hooks and export endpoints)
For lower-level access, use the core, cdk, memory, types, and utils
re-exports.
Re-exports§
pub use canic_cdk as cdk;pub use canic_core as core;pub use canic_macros as macros;pub use canic_utils as utils;
Modules§
Macros§
- build
- Embed the shared Canic configuration into a canister crate’s build script.
- build_
root - Embed the shared configuration for the root orchestrator canister.
- eager_
init - Run
$bodyduring process start-up usingctor. - eager_
static - Declare a thread-local static and schedule an eager initialization touch.
- ic_
memory - Declare a stable-memory slot backed by the Canic memory registry.
- ic_
memory_ range - Reserve a contiguous block of stable-memory IDs for the current crate.
- impl_
storable_ bounded - Implement
Storablewith a bounded size guarantee. - impl_
storable_ unbounded - Implement
Storablewithout a size bound. - log
- start
- Configure lifecycle hooks for non-root Canic canisters.
- start_
root - Configure lifecycle hooks for the root orchestrator canister.
Structs§
- Public
Error - Error
Enums§
- Level
- Debug