Skip to main content

rh_foundation/
lib.rs

1//! Foundation crate providing common utilities and types shared across the workspace.
2//!
3//! This crate provides foundational functionality including:
4//! - Error handling (`error` module)
5//! - Configuration traits (`config` module)
6//! - I/O utilities (`io` module)
7//! - HTTP utilities (`http` module, with `http` feature)
8//! - JSON helpers (`json` module)
9//! - In-memory storage (`memory` module) - WASM-compatible caching
10//! - WASM utilities (`wasm` module, with `wasm` feature)
11//! - Package loading (`loader` module, with `http` feature)
12//! - Snapshot generation (`snapshot` module)
13//!
14//! # Features
15//! - `http`: Enables HTTP client utilities (requires `reqwest` and `tokio`)
16//! - `wasm`: Enables WebAssembly utilities (requires `wasm-bindgen`)
17
18pub mod cli;
19pub mod config;
20pub mod error;
21pub mod io;
22pub mod json;
23pub mod memory;
24pub mod snapshot;
25pub mod validation;
26
27#[cfg(feature = "http")]
28pub mod http;
29
30#[cfg(feature = "http")]
31pub mod loader;
32
33#[cfg(feature = "wasm")]
34pub mod wasm;
35
36// Re-export commonly used types
37pub use config::Config;
38pub use error::{ErrorContext, ErrorWithMetadata, FoundationError, Result};
39pub use memory::{MemoryStore, MemoryStoreConfig, MemoryStoreStats};
40pub use validation::{BindingStrength, ElementBinding, ElementCardinality, Invariant, Severity};