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//! `canister-sig-creation` selects canister public-key formats and hashing.
17//! `signature-verification` selects upstream canister-signature verification.
18//! `runtime` selects raw adapters and prepared `call` requests; ordinary entrypoints select Runtime directly.
19//! `ic0` selects qualified raw system calls without Candid or an executor.
20//! `management-canister-types` selects external management HTTP/history/snapshot/status DTOs.
21//! `icrc-ledger-types` selects external ledger DTOs without storage integration.
22//! Consumers retain protocol schemas, resource limits and lifecycle policy.
23
24#[cfg(feature = "principal")]
25pub mod account;
26#[cfg(feature = "principal")]
27pub use account::{Account, AccountError, Subaccount};
28
29#[cfg(feature = "principal")]
30pub mod principal;
31#[cfg(feature = "principal")]
32pub use principal::{Principal, PrincipalError};
33
34#[cfg(all(feature = "agent", not(target_family = "wasm")))]
35pub mod agent;
36
37#[cfg(all(feature = "ic-protocol", not(target_family = "wasm")))]
38pub mod ic_protocol;
39
40#[cfg(feature = "bls")]
41pub mod bls;
42#[cfg(feature = "runtime")]
43pub use ic_platform_runtime::call;
44#[cfg(feature = "candid")]
45pub mod candid;
46#[cfg(all(feature = "candid-parser", not(target_family = "wasm")))]
47pub mod candid_parser;
48#[cfg(feature = "canister-sig-creation")]
49pub mod canister_sig_creation;
50#[cfg(feature = "runtime")]
51pub mod cdk;
52#[cfg(feature = "certification")]
53pub mod certification;
54#[cfg(all(feature = "certified-assets-types", not(target_family = "wasm")))]
55pub mod certified_assets_types;
56#[cfg(feature = "cmc-types")]
57pub mod cmc_types;
58#[cfg(feature = "cycles-ledger-types")]
59pub mod cycles_ledger_types;
60#[cfg(feature = "ecdsa")]
61pub mod ecdsa;
62#[cfg(feature = "ed25519")]
63pub mod ed25519;
64#[cfg(feature = "executor")]
65pub use ic_platform_runtime::executor;
66#[cfg(feature = "ic0")]
67pub use ic_platform_runtime::ic0;
68#[cfg(feature = "icp-ledger-types")]
69pub mod icp_ledger_types;
70#[cfg(feature = "nns-registry-types")]
71pub mod nns_registry_types;
72
73#[cfg(feature = "icrc-ledger-types")]
74pub mod icrc_ledger_types;
75#[cfg(feature = "management-canister-types")]
76pub mod management_canister_types;
77#[cfg(feature = "signature-verification")]
78pub mod signature_verification;
79
80#[cfg(feature = "runtime")]
81#[doc(hidden)]
82pub use ic_platform_runtime::__platform_println;