Skip to main content

ic_platform/
lib.rs

1//! Controlled dependencies for external Candid protocols and IC runtime integration.
2//!
3//! [`Principal`] is always available. `candid` selects bounded decoding;
4//! `executor` selects the shared CDK executor without a Candid dependency.
5//! `candid-parser` selects native host parsing and binding generation only.
6//! `agent` selects native IC transport and identities, with consumer-owned policy.
7//! `bls` selects BLS keys, signatures and verification with upstream allocation support.
8//! `canister-sig-creation` selects canister public-key formats and hashing.
9//! `signature-verification` selects upstream canister-signature verification.
10//! `cdk` selects Platform entrypoint macros and the qualified upstream CDK runtime.
11//! `ic0` selects qualified raw system calls without Candid or an executor.
12//! `management-canister-types` selects external management HTTP/history/snapshot/status DTOs.
13//! `icrc-ledger-types` selects external ledger DTOs without storage integration.
14//! Consumers retain protocol schemas, resource limits and lifecycle policy.
15
16pub use ic_principal::{Principal, PrincipalError};
17
18#[cfg(all(feature = "agent", not(target_family = "wasm")))]
19pub mod agent;
20
21#[cfg(feature = "bls")]
22pub mod bls;
23#[cfg(feature = "candid")]
24pub mod candid;
25#[cfg(all(feature = "candid-parser", not(target_family = "wasm")))]
26pub mod candid_parser;
27#[cfg(feature = "canister-sig-creation")]
28pub mod canister_sig_creation;
29#[cfg(feature = "cdk")]
30pub mod cdk;
31#[cfg(feature = "certification")]
32pub mod certification;
33#[cfg(feature = "executor")]
34pub mod executor;
35#[cfg(feature = "ic0")]
36pub mod ic0;
37#[cfg(feature = "icrc-ledger-types")]
38pub mod icrc_ledger_types;
39#[cfg(feature = "management-canister-types")]
40pub mod management_canister_types;
41#[cfg(feature = "signature-verification")]
42pub mod signature_verification;