Expand description
Canic facade crate.
This crate is the recommended dependency for downstream canister projects. It re-exports the public Canic runtime surface and provides the common macro entry points:
build!for configured canisters and generated local sandbox/probe configstart!forlib.rs(wire lifecycle hooks and export endpoints)
For lower-level access, use the api, cdk, and memory modules.
Direct access to internal core modules is intentionally unsupported.
Modules§
- access
- Public access helpers re-exported from the core access layer.
- api
- cdk
- dto
- ids
- memory
- Canic-managed stable-memory runtime boundary.
- prelude
- protocol
Macros§
- build
- Embed the shared Canic configuration into a canister crate’s build script.
- canic_
bundle_ discovery_ endpoints - canic_
bundle_ nonroot_ only_ endpoints - canic_
bundle_ observability_ endpoints - canic_
bundle_ root_ only_ endpoints - canic_
bundle_ shared_ runtime_ endpoints - canic_
bundle_ topology_ views_ endpoints - canic_
bundle_ wasm_ store_ runtime_ endpoints - canic_
emit_ auth_ attestation_ endpoints - canic_
emit_ canic_ metadata_ endpoints - canic_
emit_ cycle_ tracker_ endpoints - canic_
emit_ env_ observability_ endpoints - canic_
emit_ icp_ refill_ endpoints - Emit the opt-in canister-side ICP-to-cycles refill endpoint.
- canic_
emit_ icrc_ standards_ endpoints - canic_
emit_ lifecycle_ core_ endpoints - canic_
emit_ local_ wasm_ store_ endpoints - canic_
emit_ log_ observability_ endpoints - canic_
emit_ memory_ ledger_ diagnostic_ endpoint - canic_
emit_ metrics_ endpoints - canic_
emit_ nonroot_ auth_ attestation_ endpoints - canic_
emit_ nonroot_ sync_ topology_ endpoints - canic_
emit_ root_ admin_ endpoints - canic_
emit_ root_ auth_ attestation_ endpoints - canic_
emit_ root_ wasm_ store_ endpoints - canic_
emit_ topology_ children_ endpoints - canic_
emit_ topology_ index_ endpoints - canic_
emit_ topology_ placement_ endpoints - canic_
emit_ topology_ state_ endpoints - canic_
internal_ client - Generate a typed client for protected Canic internal update endpoints.
- canic_
protected_ endpoint - Define a shared descriptor for a protected Canic internal update endpoint.
- finish
- Finish a Canic canister module.
- impl_
storable_ bounded - Storable helpers
- impl_
storable_ unbounded - log
- Log a runtime entry using Canic’s structured logger.
- perf
- Record and log elapsed instruction counts since the last
perf!invocation in this thread. - start
- Configure lifecycle hooks for Canic canisters.
- start_
local - Configure a local-only non-root Canic canister for manual development.
- start_
wasm_ store - Configure lifecycle hooks and the canonical endpoint bundle for a subnet-local
wasm_storecanister. - timer
- timer Schedule a one-shot timer with an auto-generated label.
- timer_
guarded - timer_guarded Schedule a one-shot timer if none is already scheduled for the slot. Returns true when a new timer was scheduled.
- timer_
interval - timer_interval Schedule a repeating timer with an auto-generated label.
- timer_
interval_ guarded - timer_interval_guarded Schedule an init timer that installs a repeating timer for the slot. Returns true when a new timer was scheduled.
Structs§
Constants§
Attribute Macros§
- canic_
query - Define a Canic query endpoint.
- canic_
update - Define a Canic update endpoint.