Skip to main content

start

Macro start 

Source
macro_rules! start {
    ($canister_role:expr $(, init = $init:block)? $(,)?) => { ... };
}
Expand description

Configure lifecycle hooks for non-root Canic canisters.

This macro defines the IC-required init and post_upgrade entry points at the crate root and immediately delegates lifecycle semantics to runtime adapters after performing minimal bootstrap.

IMPORTANT:

  • This macro must remain thin
  • It must not perform orchestration
  • It must not perform async work inline
  • It must not encode policy
  • It may schedule async hooks via timers, but must never await them

Its sole responsibility is to bridge IC lifecycle hooks to runtime code.