canic-cdk 0.43.1

Canic — a canister orchestration and management toolkit for the Internet Computer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Internal macro to expose static `Principal` handles for known canisters.
//! Data lives in `.inc.rs` files and is shared with build.rs via include!().

macro_rules! static_canisters {
    ($($name:ident = $id:expr;)+) => {
        $(
            pub static $name: ::std::sync::LazyLock<::candid::Principal> =
                ::std::sync::LazyLock::new(|| {
                    ::candid::Principal::from_text($id)
                        .expect("principal literal validated by build.rs")
                });
        )+
    }
}