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