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//! `pocket-ic` selects native simulator client identities; Testkit owns lifecycle policy.
8//! `secp256k1` selects native offline public-key derivation with upstream identities.
9//! `bls` selects BLS keys, signatures and verification with upstream allocation support.
10//! `canister-sig-creation` selects canister public-key formats and hashing.
11//! `signature-verification` selects upstream canister-signature verification.
12//! `cdk` selects Platform entrypoint macros and the qualified upstream CDK runtime.
13//! `ic0` selects qualified raw system calls without Candid or an executor.
14//! `management-canister-types` selects external management HTTP/history/snapshot/status DTOs.
15//! `icrc-ledger-types` selects external ledger DTOs without storage integration.
16//! Consumers retain protocol schemas, resource limits and lifecycle policy.
17
18pub use ic_principal::{Principal, PrincipalError};
19
20#[cfg(all(feature = "agent", not(target_family = "wasm")))]
21pub mod agent;
22
23#[cfg(feature = "bls")]
24pub mod bls;
25#[cfg(feature = "candid")]
26pub mod candid;
27#[cfg(all(feature = "candid-parser", not(target_family = "wasm")))]
28pub mod candid_parser;
29#[cfg(feature = "canister-sig-creation")]
30pub mod canister_sig_creation;
31#[cfg(feature = "cdk")]
32pub mod cdk;
33#[cfg(feature = "certification")]
34pub mod certification;
35#[cfg(feature = "ecdsa")]
36pub mod ecdsa;
37#[cfg(feature = "ed25519")]
38pub mod ed25519;
39#[cfg(feature = "executor")]
40pub mod executor;
41#[cfg(feature = "ic0")]
42pub mod ic0;
43#[cfg(feature = "icrc-ledger-types")]
44pub mod icrc_ledger_types;
45#[cfg(feature = "management-canister-types")]
46pub mod management_canister_types;
47#[cfg(all(feature = "secp256k1", not(target_family = "wasm")))]
48pub mod secp256k1;
49#[cfg(feature = "signature-verification")]
50pub mod signature_verification;
51
52#[cfg(all(feature = "pocket-ic", not(target_family = "wasm")))]
53pub mod pocket_ic;