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;
21mod duration;
22#[cfg(feature = "host")]
23mod hex;
24#[cfg(feature = "host")]
25mod ic_registry;
26pub mod icrc;
27pub mod nns;
28#[cfg(feature = "cli")]
29mod output;
30#[cfg(feature = "host")]
31mod progress;
32#[cfg(feature = "cli")]
33mod project;
34#[cfg(feature = "host")]
35mod runtime;
36#[cfg(feature = "host")]
37pub(crate) mod snapshot_cache;
38pub mod sns;
39pub mod subnet_catalog;
40mod table;
41#[cfg(feature = "host")]
42mod text_search;
43mod text_value;
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;