Skip to main content

ic_query/
lib.rs

1//! Reusable report models and helpers for Internet Computer metadata queries.
2//!
3//! The default feature set is empty. A dependency using
4//! `default-features = false` gets the pure report DTOs, renderers, and local
5//! parsing/resolution helpers that are intended to stay free of native
6//! live-call dependencies.
7//!
8//! This is a host dependency boundary, not a `no_std` promise. No-default
9//! builds are expected to compile for `wasm32-unknown-unknown` without
10//! `ic-agent`, Reqwest, Tokio, or `futures`, but they may still use ordinary
11//! `std` types such as `String` and `Vec`.
12//!
13//! Enable `dashboard-host` for official Dashboard live/cache APIs,
14//! `ic-state-host` for certified IC state-tree reports,
15//! `cloud-engine-host` for native CloudEngine control-plane reports (combine it
16//! with `subnet-catalog-host` for the Registry-backed CloudEngine list),
17//! `icrc-host` for native ICRC ledger/index APIs, `sns-host` for native SNS
18//! live/cache APIs, `cmc-host` for certified Cycles Minting Canister reports,
19//! `subnet-catalog-host` for the focused live/cache Subnet catalog API,
20//! `certified-subnet-catalog-host` for that API plus certified Registry archive,
21//! replay, and archive-bound catalog authority,
22//! `nns-topology-host` for that API plus exact-version joined NNS Subnet
23//! topology, `nns-host` for the complete NNS host surface, or `host` for every
24//! native live-call adapter and runtime helper. CLI parsing and process IO
25//! belong to the separate `ic-query-cli` crate.
26
27#[cfg(any(
28    feature = "cloud-engine-host",
29    feature = "cmc-host",
30    feature = "ic-state-host",
31    feature = "icrc-host",
32    feature = "sns-host",
33    feature = "subnet-catalog-host"
34))]
35mod agent;
36pub mod cache;
37#[cfg(any(
38    feature = "dashboard-host",
39    feature = "icrc-host",
40    feature = "sns-host",
41    feature = "subnet-catalog-host"
42))]
43mod cache_file;
44#[cfg(any(
45    feature = "certified-subnet-catalog-host",
46    feature = "cmc-host",
47    feature = "ic-state-host",
48    feature = "icrc-host"
49))]
50mod certification;
51pub mod cloud_engine;
52pub mod duration;
53#[cfg(any(
54    feature = "dashboard-host",
55    feature = "icrc-host",
56    feature = "sns-host",
57    feature = "subnet-catalog-host"
58))]
59mod freshness;
60mod hex;
61#[cfg(any(
62    feature = "cloud-engine-host",
63    feature = "cmc-host",
64    feature = "dashboard-host",
65    feature = "ic-state-host",
66    feature = "icrc-host",
67    feature = "sns-host",
68    feature = "subnet-catalog-host"
69))]
70mod http_endpoint;
71mod human_quantity;
72pub mod ic;
73#[cfg(feature = "subnet-catalog-host")]
74mod ic_registry;
75pub mod icrc;
76#[cfg(any(feature = "certified-subnet-catalog-host", feature = "ic-state-host"))]
77mod leb128;
78#[cfg(any(
79    feature = "cloud-engine-host",
80    feature = "cmc-host",
81    feature = "dashboard-host",
82    feature = "sns-host",
83    feature = "subnet-catalog-host"
84))]
85mod network;
86pub mod nns;
87#[cfg(any(
88    feature = "dashboard-host",
89    feature = "icrc-host",
90    feature = "nns-host",
91    feature = "sns-host"
92))]
93mod progress;
94pub mod report;
95#[cfg(any(feature = "nns-host", feature = "sns-host"))]
96mod report_sort;
97#[cfg(any(
98    feature = "cloud-engine-host",
99    feature = "cmc-host",
100    feature = "dashboard-host",
101    feature = "ic-state-host",
102    feature = "icrc-host",
103    feature = "sns-host",
104    feature = "subnet-catalog-host"
105))]
106mod runtime;
107#[cfg(any(
108    feature = "dashboard-host",
109    feature = "icrc-host",
110    feature = "nns-host",
111    feature = "sns-host"
112))]
113pub(crate) mod snapshot_cache;
114pub mod sns;
115pub mod subnet_catalog;
116pub mod system;
117
118#[cfg(any(
119    feature = "dashboard-host",
120    feature = "icrc-host",
121    feature = "sns-host",
122    feature = "subnet-catalog-host"
123))]
124pub use cache_file::{CacheFileError, HostCacheError};
125mod table;
126#[cfg(any(feature = "nns-host", feature = "sns-host"))]
127mod text_search;
128mod text_value;
129mod token_amount;
130mod token_metadata_text;
131
132#[cfg(all(
133    test,
134    any(
135        feature = "dashboard-host",
136        feature = "icrc-host",
137        feature = "sns-host",
138        feature = "subnet-catalog-host"
139    )
140))]
141mod test_support;
142
143#[cfg(test)]
144mod tests;
145
146#[cfg(any(
147    feature = "dashboard-host",
148    feature = "icrc-host",
149    feature = "nns-host",
150    feature = "sns-host"
151))]
152pub use progress::{QueryProgress, QueryProgressEvent, QueryProgressState};