macro_rules! start {
($canister_role:expr) => { ... };
}Expand description
Configure lifecycle hooks for non-root Canic canisters.
This macro wires up the init and post_upgrade entry points required by the IC,
performing pre-initialization steps (config, memory, TLS, environment) before invoking
user async functions:
ⓘ
async fn canic_setup() { /* shared setup */ }
async fn canic_install(args: Option<Vec<u8>>) { /* called after init */ }
async fn canic_upgrade() { /* called after post_upgrade */ }These functions are spawned asynchronously after bootstrap completes. The macro also exposes the standard non-root Canic endpoint suites.
This macro must be used instead of a normal function because the IC runtime requires
init and post_upgrade to be declared at the top level.