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!/build_root!forbuild.rs(validate/embedcanic.toml)start!/start_root!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.
Re-exports§
pub use canic_cdk as cdk;pub use canic_memory as memory;
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.
- build_
root_ with - Embed the shared root configuration and run extra build-time generation.
- build_
with - Embed the shared Canic configuration and run extra build-time generation.
- canic_
bundle_ nonroot_ only_ endpoints - canic_
bundle_ observability_ endpoints - canic_
bundle_ root_ only_ endpoints - canic_
bundle_ shared_ runtime_ endpoints - canic_
bundle_ standards_ endpoints - canic_
bundle_ topology_ views_ endpoints - canic_
bundle_ wasm_ store_ runtime_ endpoints - canic_
emit_ auth_ attestation_ endpoints - canic_
emit_ canic_ metadata_ endpoints - canic_
emit_ env_ observability_ endpoints - canic_
emit_ icrc_ standards_ endpoints - canic_
emit_ lifecycle_ core_ endpoints - canic_
emit_ local_ wasm_ store_ endpoints - canic_
emit_ log_ observability_ endpoints - canic_
emit_ memory_ observability_ endpoints - 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_ cycles_ endpoints - canic_
emit_ topology_ index_ endpoints - canic_
emit_ topology_ placement_ endpoints - canic_
emit_ topology_ state_ endpoints - 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 non-root Canic canisters.
- start_
root - Configure lifecycle hooks for the root orchestrator canister.
- 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.