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 and CLI dependencies.
7//!
8//! This is a host/CLI dependency boundary, not a `no_std` promise. No-default
9//! builds are expected to compile for `wasm32-unknown-unknown` without
10//! `ic-agent`, Tokio, `futures`, or `clap`, but they may still use ordinary
11//! `std` types such as `String` and `Vec`.
12//!
13//! Enable `host` for native live-call adapters and runtime helpers. Enable
14//! `cli` for the family-level command adapters used by `ic-query-cli`; `cli`
15//! implies `host`.
16
17#[cfg(feature = "host")]
18mod cache_file;
19#[cfg(feature = "cli")]
20mod cli;
21#[cfg(feature = "host")]
22mod duration;
23#[cfg(feature = "host")]
24mod hex;
25#[cfg(feature = "host")]
26mod ic_registry;
27pub mod icrc;
28pub mod nns;
29#[cfg(feature = "host")]
30mod output;
31#[cfg(feature = "host")]
32mod progress;
33#[cfg(feature = "host")]
34mod project;
35#[cfg(feature = "host")]
36mod runtime;
37#[cfg(feature = "host")]
38pub(crate) mod snapshot_cache;
39pub mod sns;
40pub mod subnet_catalog;
41mod table;
42#[cfg(feature = "host")]
43mod text_search;
44mod token_amount;
45mod token_metadata_text;
46
47#[cfg(all(test, feature = "host"))]
48mod test_support;
49
50const VERSION_TEXT: &str = concat!("icq ", env!("CARGO_PKG_VERSION"));
51
52#[must_use]
53pub const fn version_text() -> &'static str {
54    VERSION_TEXT
55}
56
57#[cfg(test)]
58mod tests;