Skip to main content

ic_platform/
lib.rs

1//! Controlled dependencies for IC runtime integration and required IC Candid interfaces.
2//!
3//! All owned application endpoints use IC Wire, including public endpoints.
4//! Candid adapts required management/system, NNS/SNS, ledger and other Candid
5//! interfaces; caller location does not select the codec. Existing Candid
6//! checkpoints remain a legacy persisted-data compatibility exception.
7//!
8//! `principal` selects Principal and Account. `candid` selects bounded decoding;
9//! `executor` selects the shared CDK executor without a Candid dependency.
10//! `candid-parser` selects native external Candid parsing and type checking.
11//! `candid-service` separately selects Candid service declaration generation.
12//! `agent` selects native IC transport and identities, with consumer-owned policy.
13//! `ic-protocol` selects native typed packet codecs without Agent or runtime.
14//! `ic-protocol-fixtures` additionally selects native development protocol fixtures.
15//! `bls` selects BLS keys, signatures and verification with upstream allocation support.
16//! `blake3` selects the upstream hash function, streaming hasher and digest identity.
17//! `canister-sig-creation` selects canister public-key formats and hashing.
18//! `signature-verification` selects upstream canister-signature verification.
19//! `runtime` selects raw adapters and prepared `call` requests; ordinary entrypoints select Runtime directly.
20//! `ic0` selects qualified raw system calls without Candid or an executor.
21//! `management-canister-types` selects external management HTTP/history/snapshot/status DTOs.
22//! `icrc-ledger-types` selects external ledger DTOs without storage integration.
23//! Consumers retain protocol schemas, resource limits and lifecycle policy.
24
25#[cfg(feature = "principal")]
26pub mod account;
27#[cfg(feature = "principal")]
28pub use account::{Account, AccountError, Subaccount};
29
30#[cfg(feature = "principal")]
31pub mod principal;
32#[cfg(feature = "principal")]
33pub use principal::{Principal, PrincipalError};
34
35#[cfg(all(feature = "agent", not(target_family = "wasm")))]
36pub mod agent;
37
38#[cfg(all(feature = "ic-protocol", not(target_family = "wasm")))]
39pub mod ic_protocol;
40
41#[cfg(feature = "blake3")]
42pub mod blake3;
43#[cfg(feature = "bls")]
44pub mod bls;
45#[cfg(feature = "runtime")]
46pub use ic_platform_runtime::call;
47#[cfg(feature = "candid")]
48pub mod candid;
49#[cfg(all(feature = "candid-parser", not(target_family = "wasm")))]
50pub mod candid_parser;
51#[cfg(feature = "canister-sig-creation")]
52pub mod canister_sig_creation;
53#[cfg(feature = "runtime")]
54pub mod cdk;
55#[cfg(feature = "certification")]
56pub mod certification;
57#[cfg(all(feature = "certified-assets-types", not(target_family = "wasm")))]
58pub mod certified_assets_types;
59#[cfg(feature = "cmc-types")]
60pub mod cmc_types;
61#[cfg(feature = "cycles-ledger-types")]
62pub mod cycles_ledger_types;
63#[cfg(feature = "ecdsa")]
64pub mod ecdsa;
65#[cfg(feature = "ed25519")]
66pub mod ed25519;
67#[cfg(feature = "executor")]
68pub use ic_platform_runtime::executor;
69#[cfg(feature = "ic0")]
70pub use ic_platform_runtime::ic0;
71#[cfg(feature = "icp-ledger-types")]
72pub mod icp_ledger_types;
73#[cfg(feature = "nns-registry-types")]
74pub mod nns_registry_types;
75
76#[cfg(feature = "icrc-ledger-types")]
77pub mod icrc_ledger_types;
78#[cfg(feature = "management-canister-types")]
79pub mod management_canister_types;
80#[cfg(feature = "signature-verification")]
81pub mod signature_verification;
82
83#[cfg(feature = "runtime")]
84#[doc(hidden)]
85pub use ic_platform_runtime::__platform_println;