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, dto, and memory modules.
These surfaces are for configured canister role packages. Shared runtime
libraries should remain independent of Canic and use upstream crates such
as candid or ic-cdk directly when they need generic IC types or APIs.
Direct access to internal core modules is intentionally unsupported.
Modules§
- access
- Public access helpers re-exported from the core access layer.
- api
- dto
- ids
- memory
- Module: memory
- prelude
- protocol
Macros§
- build
- Embed the shared Canic configuration into a canister crate’s build script.
- canic_
bundle_ discovery_ endpoints - Emit the default runtime discovery endpoint bundle.
- canic_
bundle_ nonroot_ only_ endpoints - Emit the non-root-only runtime endpoint surface.
- canic_
bundle_ observability_ endpoints - Emit shared observability and operator-facing diagnostic endpoints.
- canic_
bundle_ root_ only_ endpoints - Emit the root-only runtime endpoint surface.
- canic_
bundle_ shared_ runtime_ endpoints - Emit the default shared runtime endpoint surface for all Canic canisters.
- canic_
bundle_ topology_ views_ endpoints - Emit the standard topology view endpoint bundle.
- canic_
bundle_ wasm_ store_ runtime_ endpoints - Emit the canonical subnet-local wasm-store runtime endpoint surface.
- canic_
emit_ auth_ attestation_ endpoints - Emit the response-capability and trust-chain runtime endpoint.
- canic_
emit_ blob_ storage_ billing_ endpoints - canic_
emit_ blob_ storage_ endpoints - canic_
emit_ canic_ metadata_ endpoints - Emit the Canic metadata endpoint shared by all Canic canisters.
- canic_
emit_ cycle_ tracker_ endpoints - Emit the standard cycle-tracker query endpoints.
- canic_
emit_ env_ observability_ endpoints - Emit the environment snapshot diagnostic endpoint shared by all Canic canisters.
- canic_
emit_ icp_ refill_ endpoints - canic_
emit_ icrc_ standards_ endpoints - Emit the ICRC standards-facing query endpoints shared by all Canic canisters.
- canic_
emit_ lifecycle_ core_ endpoints - Emit the lifecycle and runtime readiness endpoints shared by all Canic canisters.
- canic_
emit_ local_ wasm_ store_ endpoints - Emit the canonical local wasm-store canister endpoint surface.
- canic_
emit_ log_ observability_ endpoints - Emit runtime log diagnostic endpoints shared by all Canic canisters.
- canic_
emit_ memory_ ledger_ diagnostic_ endpoint - Emit the minimal stable-memory ABI ledger recovery diagnostic endpoint.
- canic_
emit_ metrics_ endpoints - Emit the metrics query surface shared by all Canic canisters.
- canic_
emit_ nonroot_ auth_ attestation_ endpoints - Emit the non-root delegated-token issuer provisioning endpoints.
- canic_
emit_ nonroot_ sync_ topology_ endpoints - Emit the non-root sync endpoints used for state and topology propagation.
- canic_
emit_ root_ admin_ endpoints - Emit root-only control-plane, registry, and operator admin endpoints.
- canic_
emit_ root_ auth_ attestation_ endpoints - Emit root-only auth, delegation, and attestation authority endpoints.
- canic_
emit_ root_ wasm_ store_ endpoints - Emit root-only wasm-store bootstrap and publication control endpoints.
- canic_
emit_ runtime_ introspection_ endpoints - Emit guarded runtime introspection endpoints shared by all Canic canisters.
- canic_
emit_ topology_ children_ endpoints - Emit the shared topology-children query endpoint.
- canic_
emit_ topology_ index_ endpoints - Emit shared topology index query endpoints.
- canic_
emit_ topology_ placement_ endpoints - Emit shared scaling and sharding placement view endpoints.
- canic_
emit_ topology_ state_ endpoints - Emit root-only topology state snapshot endpoints.
- finish
- Finish a Canic canister module.
- impl_
storable_ bounded - impl_storable_bounded
- impl_
storable_ unbounded - 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_
interval - timer_interval Schedule a repeating timer with an auto-generated label.
Structs§
Constants§
Attribute Macros§
- canic_
query - Define a Canic query endpoint.
- canic_
update - Define a Canic update endpoint.