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//! `icrc-host` for native ICRC ledger/index APIs, `subnet-catalog-host` for the
15//! focused live/cache Subnet catalog API, `nns-topology-host` for that API plus
16//! exact-version joined NNS Subnet topology, or `host` for every native
17//! live-call adapter and runtime helper. CLI parsing and process IO belong to
18//! the separate `ic-query-cli` crate.
19
20#[cfg(any(feature = "icrc-host", feature = "subnet-catalog-host"))]
21mod agent;
22pub mod cache;
23#[cfg(any(
24    feature = "dashboard-host",
25    feature = "icrc-host",
26    feature = "subnet-catalog-host"
27))]
28mod cache_file;
29#[cfg(feature = "icrc-host")]
30mod certification;
31pub mod duration;
32#[cfg(any(
33    feature = "dashboard-host",
34    feature = "icrc-host",
35    feature = "subnet-catalog-host"
36))]
37mod freshness;
38mod hex;
39#[cfg(any(
40    feature = "dashboard-host",
41    feature = "icrc-host",
42    feature = "subnet-catalog-host"
43))]
44mod http_endpoint;
45mod human_quantity;
46pub mod ic;
47#[cfg(feature = "subnet-catalog-host")]
48mod ic_registry;
49pub mod icrc;
50#[cfg(any(feature = "dashboard-host", feature = "subnet-catalog-host"))]
51mod network;
52pub mod nns;
53#[cfg(any(feature = "dashboard-host", feature = "icrc-host"))]
54mod progress;
55pub mod report;
56#[cfg(feature = "host")]
57mod report_sort;
58#[cfg(any(
59    feature = "dashboard-host",
60    feature = "icrc-host",
61    feature = "subnet-catalog-host"
62))]
63mod runtime;
64#[cfg(any(feature = "dashboard-host", feature = "icrc-host"))]
65pub(crate) mod snapshot_cache;
66pub mod sns;
67pub mod subnet_catalog;
68pub mod system;
69
70#[cfg(any(
71    feature = "dashboard-host",
72    feature = "icrc-host",
73    feature = "subnet-catalog-host"
74))]
75pub use cache_file::{CacheFileError, HostCacheError};
76mod table;
77#[cfg(feature = "host")]
78mod text_search;
79mod text_value;
80mod token_amount;
81mod token_metadata_text;
82
83#[cfg(all(
84    test,
85    any(
86        feature = "dashboard-host",
87        feature = "icrc-host",
88        feature = "subnet-catalog-host"
89    )
90))]
91mod test_support;
92
93#[cfg(test)]
94mod tests;
95
96#[cfg(any(feature = "dashboard-host", feature = "icrc-host"))]
97pub use progress::{QueryProgress, QueryProgressEvent, QueryProgressState};