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//! `cloud-engine-host` for native CloudEngine control-plane reports,
15//! `icrc-host` for native ICRC ledger/index APIs, `sns-host` for native SNS
16//! live/cache APIs, `cmc-host` for certified Cycles Minting Canister reports,
17//! `subnet-catalog-host` for the focused live/cache Subnet catalog API,
18//! `certified-subnet-catalog-host` for that API plus certified Registry archive,
19//! replay, and archive-bound catalog authority,
20//! `nns-topology-host` for that API plus exact-version joined NNS Subnet
21//! topology, `nns-host` for the complete NNS host surface, or `host` for every
22//! native live-call adapter and runtime helper. CLI parsing and process IO
23//! belong to the separate `ic-query-cli` crate.
24
25#[cfg(any(
26    feature = "cloud-engine-host",
27    feature = "cmc-host",
28    feature = "icrc-host",
29    feature = "sns-host",
30    feature = "subnet-catalog-host"
31))]
32mod agent;
33pub mod cache;
34#[cfg(any(
35    feature = "dashboard-host",
36    feature = "icrc-host",
37    feature = "sns-host",
38    feature = "subnet-catalog-host"
39))]
40mod cache_file;
41#[cfg(any(
42    feature = "certified-subnet-catalog-host",
43    feature = "cmc-host",
44    feature = "icrc-host"
45))]
46mod certification;
47pub mod cloud_engine;
48pub mod duration;
49#[cfg(any(
50    feature = "dashboard-host",
51    feature = "icrc-host",
52    feature = "sns-host",
53    feature = "subnet-catalog-host"
54))]
55mod freshness;
56mod hex;
57#[cfg(any(
58    feature = "cloud-engine-host",
59    feature = "cmc-host",
60    feature = "dashboard-host",
61    feature = "icrc-host",
62    feature = "sns-host",
63    feature = "subnet-catalog-host"
64))]
65mod http_endpoint;
66mod human_quantity;
67pub mod ic;
68#[cfg(feature = "subnet-catalog-host")]
69mod ic_registry;
70pub mod icrc;
71#[cfg(any(
72    feature = "cloud-engine-host",
73    feature = "cmc-host",
74    feature = "dashboard-host",
75    feature = "sns-host",
76    feature = "subnet-catalog-host"
77))]
78mod network;
79pub mod nns;
80#[cfg(any(
81    feature = "dashboard-host",
82    feature = "icrc-host",
83    feature = "nns-host",
84    feature = "sns-host"
85))]
86mod progress;
87pub mod report;
88#[cfg(any(feature = "nns-host", feature = "sns-host"))]
89mod report_sort;
90#[cfg(any(
91    feature = "cloud-engine-host",
92    feature = "cmc-host",
93    feature = "dashboard-host",
94    feature = "icrc-host",
95    feature = "sns-host",
96    feature = "subnet-catalog-host"
97))]
98mod runtime;
99#[cfg(any(
100    feature = "dashboard-host",
101    feature = "icrc-host",
102    feature = "nns-host",
103    feature = "sns-host"
104))]
105pub(crate) mod snapshot_cache;
106pub mod sns;
107pub mod subnet_catalog;
108pub mod system;
109
110#[cfg(any(
111    feature = "dashboard-host",
112    feature = "icrc-host",
113    feature = "sns-host",
114    feature = "subnet-catalog-host"
115))]
116pub use cache_file::{CacheFileError, HostCacheError};
117mod table;
118#[cfg(any(feature = "nns-host", feature = "sns-host"))]
119mod text_search;
120mod text_value;
121mod token_amount;
122mod token_metadata_text;
123
124#[cfg(all(
125    test,
126    any(
127        feature = "dashboard-host",
128        feature = "icrc-host",
129        feature = "sns-host",
130        feature = "subnet-catalog-host"
131    )
132))]
133mod test_support;
134
135#[cfg(test)]
136mod tests;
137
138#[cfg(any(
139    feature = "dashboard-host",
140    feature = "icrc-host",
141    feature = "nns-host",
142    feature = "sns-host"
143))]
144pub use progress::{QueryProgress, QueryProgressEvent, QueryProgressState};