Skip to main content

host_chain_core/
lib.rs

1//! host-chain-core — WASM-compatible portable networking, parsing, and chain types.
2//!
3//! Compiles to both native (`x86_64`, `aarch64`) and `wasm32-unknown-unknown`.
4//! Uses `reqwest` as the sole HTTP client: `rustls-tls` on native,
5//! browser `fetch()` via `web-sys` on WASM — same Rust code, no JS glue.
6//! Uses `ruzstd` for zstd decompression (pure Rust, no C FFI).
7//!
8//! # Modules
9//!
10//! - [`car`] — CARv1 / UnixFS parser (ruzstd for decompression)
11//! - [`chain`] — shared chain data types (ChainId, ChainState, etc.)
12//! - [`dotns`] — async DOTNS resolution pipeline (reqwest for HTTP)
13//! - [`identity`] — async username resolution via Substrate Identity pallet
14//! - [`registry`] — genesis-hash-to-ChainId lookup table
15//! - [`state_machine`] — generic chain state machine (shared WASM/native)
16//! - [`store`] — chain database persistence abstraction
17
18pub mod car;
19pub mod chain;
20pub mod dotns;
21pub mod identity;
22pub mod registration;
23pub mod registry;
24pub mod state_machine;
25pub mod store;
26pub mod subscription;