Skip to main content

Crate canic

Crate canic 

Source
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 config
  • start! for configured canister lifecycle hooks and endpoints
  • start_fleet_coordinator! for Canic’s canonical Coordinator artifact source

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
diagnostics
Public compact diagnostic identities and Canic-owned registered reasons.
dto
fleet_admission
Synchronous Fleet-admission guard for endpoints owned by a composed framework.
ids
memory
Module: memory
prelude
protocol

Macros§

application_scope
Construct one statically validated canonical application scope.
build
Embed the shared Canic configuration into a canister crate’s build script.
canic_bundle_root_only_endpoints
Emit the root-only runtime endpoint surface.
canic_bundle_wasm_store_runtime_endpoints
Emit the canonical Fleet Subnet Root-local wasm-store endpoint surface.
canic_emit_blob_storage_billing_endpoints
canic_emit_blob_storage_endpoints
canic_emit_fleet_coordinator_endpoints
Emit the Fleet Coordinator’s exact command and status methods.
canic_emit_icrc_standards_endpoints
Emit the ICRC standards-facing query endpoints selected for this profile.
canic_emit_local_wasm_store_endpoints
Emit the canonical local wasm-store canister endpoint surface.
canic_emit_root_command_endpoint
Emit the Fleet Subnet Root’s role-owned command update.
canic_emit_root_status_endpoint
Emit the Fleet Subnet Root’s role-owned status query.
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_fleet_coordinator
Configure the dedicated built-in Fleet Coordinator canister surface.
start_fleet_root
Configure Canic’s canonical Fleet Subnet Root lifecycle and endpoints.
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 Fleet Subnet Root-local wasm_store canister.

Structs§

DiagnosticCode
DiagnosticCode
Error
Error
RegisteredDiagnosticCode
RegisteredDiagnosticCode

Constants§

CANIC_DEFAULT_UPDATE_INGRESS_MAX_BYTES
CANIC_WASM_CHUNK_BYTES
VERSION

Attribute Macros§

canic_query
Define a Canic query endpoint.
canic_update
Define a Canic update endpoint.