Skip to main content

hexz_common/
lib.rs

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