Skip to main content

hexz_common/
lib.rs

1//! Common types, configuration, and constants shared by Hexz crates.
2//!
3//! This crate centralizes configuration loading, error types, logging setup,
4//! and format constants so that the CLI, core, fuse, and server layers
5//! share a single source of truth for defaults and wire formats.
6
7/// Configuration loading and runtime parameter management for Hexz tools.
8///
9/// Exposes the `Config` type used by the CLI and library layers to negotiate
10/// defaults (paths, logging, feature flags) in a single place.
11pub mod config;
12
13/// Shared constants and format parameters for the Hexz ecosystem.
14///
15/// Defines magic bytes, format version, header size, block sizes, and
16/// codec-related constants used across core, fuse, and CLI crates. Changing
17/// these values affects on-disk layout and must be coordinated with format
18/// readers and writers.
19pub mod constants;
20
21/// Cryptographic utilities shared across crates.
22///
23/// Houses password-based key-derivation parameters and related helpers that
24/// are embedded into snapshot metadata when encryption is enabled.
25pub mod crypto;
26
27/// Core error types and result aliases used by Hexz.
28///
29/// This module defines `Error` and `Result<T>`, which are re-exported at
30/// the crate root for ergonomic use in downstream crates.
31pub mod error;
32
33/// Logging initialization for the Hexz ecosystem.
34///
35/// Provides a single entry point for setting up structured logging so that
36/// binaries can configure sinks and log levels consistently.
37pub mod logging;
38#[cfg(feature = "signing")]
39pub mod sign;
40
41pub use config::Config;
42pub use error::{Error, Result};