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//! `pocket-ic` selects native simulator client identities; Testkit owns lifecycle policy.
14//! `secp256k1` selects native offline public-key derivation with upstream identities.
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//! `gzip` selects native bounded gzip codecs maintained by IC Tooling.
18//! `canister-sig-creation` selects canister public-key formats and hashing.
19//! `signature-verification` selects upstream canister-signature verification.
20//! `cdk` selects owned explicit-codec entrypoints and a Candid-free runtime.
21//! `runtime` selects those same runtime adapters without the entrypoint generator.
22//! `ic0` selects qualified raw system calls without Candid or an executor.
23//! `management-canister-types` selects external management HTTP/history/snapshot/status DTOs.
24//! `icrc-ledger-types` selects external ledger DTOs without storage integration.
25//! Consumers retain protocol schemas, resource limits and lifecycle policy.
26
27#[cfg(feature = "principal")]
28pub mod account;
29#[cfg(feature = "principal")]
30pub use account::{Account, AccountError, Subaccount};
31
32#[cfg(any(feature = "canister-sig-creation", feature = "signature-verification"))]
33mod signature_upstream;
34
35#[cfg(feature = "principal")]
36pub mod principal;
37#[cfg(feature = "principal")]
38pub use principal::{Principal, PrincipalError};
39
40#[cfg(all(feature = "agent", not(target_family = "wasm")))]
41pub mod agent;
42
43#[cfg(feature = "blake3")]
44pub mod blake3;
45#[cfg(feature = "bls")]
46pub mod bls;
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 mod executor;
69#[cfg(all(feature = "gzip", not(target_family = "wasm")))]
70pub mod gzip;
71#[cfg(feature = "ic0")]
72pub mod ic0;
73#[cfg(feature = "icp-ledger-types")]
74pub mod icp_ledger_types;
75#[cfg(feature = "nns-registry-types")]
76pub mod nns_registry_types;
77
78#[cfg(feature = "icrc-ledger-types")]
79pub mod icrc_ledger_types;
80#[cfg(feature = "management-canister-types")]
81pub mod management_canister_types;
82#[cfg(all(feature = "secp256k1", not(target_family = "wasm")))]
83pub mod secp256k1;
84#[cfg(feature = "signature-verification")]
85pub mod signature_verification;
86#[cfg(feature = "stable-structures")]
87pub mod stable_structures;
88
89#[cfg(all(feature = "pocket-ic", not(target_family = "wasm")))]
90pub mod pocket_ic;