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//! `raw-rand` selects the dependency-free management entropy codec, without transport.
21//! `candid-args` selects small, dependency-free external argument encoders.
22//! `management-canister-types` selects external management HTTP/history/snapshot/status DTOs.
23//! `icrc-ledger-types` selects external ledger DTOs without storage integration.
24//! Consumers retain protocol schemas, resource limits and lifecycle policy.
25
26#[cfg(feature = "principal")]
27pub mod account;
28#[cfg(feature = "principal")]
29pub use account::{Account, AccountError, Subaccount};
30
31#[cfg(feature = "principal")]
32pub mod principal;
33#[cfg(feature = "raw-rand")]
34pub mod raw_rand;
35#[cfg(feature = "principal")]
36pub use principal::{Principal, PrincipalError};
37
38#[cfg(all(feature = "agent", not(target_family = "wasm")))]
39pub mod agent;
40
41#[cfg(all(feature = "ic-protocol", not(target_family = "wasm")))]
42pub mod ic_protocol;
43
44#[cfg(feature = "bls")]
45pub mod bls;
46#[cfg(feature = "runtime")]
47pub use ic_platform_runtime::call;
48#[cfg(feature = "candid")]
49pub mod candid;
50#[cfg(feature = "candid-args")]
51pub mod candid_args;
52#[cfg(all(feature = "candid-parser", not(target_family = "wasm")))]
53pub mod candid_parser;
54#[cfg(feature = "canister-sig-creation")]
55pub mod canister_sig_creation;
56#[cfg(feature = "runtime")]
57pub mod cdk;
58#[cfg(feature = "certification")]
59pub mod certification;
60#[cfg(all(feature = "certified-assets-types", not(target_family = "wasm")))]
61pub mod certified_assets_types;
62#[cfg(feature = "cmc-types")]
63pub mod cmc_types;
64#[cfg(feature = "cycles-ledger-types")]
65pub mod cycles_ledger_types;
66#[cfg(feature = "ecdsa")]
67pub mod ecdsa;
68#[cfg(feature = "ed25519")]
69pub mod ed25519;
70#[cfg(feature = "executor")]
71pub use ic_platform_runtime::executor;
72#[cfg(feature = "ic0")]
73pub use ic_platform_runtime::ic0;
74#[cfg(feature = "icp-ledger-types")]
75pub mod icp_ledger_types;
76#[cfg(feature = "nns-registry-types")]
77pub mod nns_registry_types;
78
79#[cfg(feature = "icrc-ledger-types")]
80pub mod icrc_ledger_types;
81#[cfg(feature = "management-canister-types")]
82pub mod management_canister_types;
83#[cfg(feature = "signature-verification")]
84pub mod signature_verification;
85
86#[cfg(feature = "runtime")]
87#[doc(hidden)]
88pub use ic_platform_runtime::__platform_println;