Expand description
ICU crate utilities for multi-canister apps on the Internet Computer.
Modules§
- auth
- Authorization helpers for canister-to-canister and user calls.
- canister
- cdk
- config
- eager
- env
- export
- guard
- interface
- macros
- Public macro entry points used across Canic.
- memory
- ICU Memory ID Layout (5–30)
- ops
- Business-logic helpers that sit between endpoint handlers and the state layer.
- prelude
- Prelude
- spec
- state
- types
- utils
Macros§
- auth_
require_ all - Enforce that every supplied rule future succeeds for the current caller.
- auth_
require_ any - Enforce that at least one supplied rule future succeeds for the current caller.
- canic_
build - Embed the shared Canic configuration into a canister crate’s build script.
- canic_
build_ root - Embed the shared configuration for the root orchestrator canister.
- canic_
endpoints - Expose the shared query and update handlers used by all Canic canisters.
- canic_
endpoints_ delegation - Add delegation-specific endpoints when the capability is enabled.
- canic_
endpoints_ nonroot - Generate the endpoint surface for non-root canisters.
- canic_
endpoints_ root - Generate the endpoint surface for the root orchestrator canister.
- canic_
endpoints_ scaling - Add scaling registry endpoints when the capability is enabled.
- canic_
endpoints_ sharding - Add sharding endpoints when the capability is enabled.
- canic_
start - Configure lifecycle hooks for non-root Canic canisters.
- canic_
start_ root - Configure lifecycle hooks for the root Canic 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
- Emit a structured log line with consistent coloring and headers.
- perf
- Log elapsed instruction counts since the last
perf!invocation. - perf_
start - Record a single-call instruction counter snapshot when the surrounding scope exits.
Enums§
Constants§
- CANISTER_
INIT_ DELAY - Constants
- CRATE_
NAME - Crate Version
- LOG_
CANISTER_ TYPE_ ELLIPSIS_ THRESHOLD - LOG_
CANISTER_ TYPE_ WIDTH - Logging layout constants
- VERSION
Functions§
- expect_
or_ trap - expect_or_trap