hexz_cli/cmd/sys/mod.rs
1//! System utility commands for diagnostics and services.
2//!
3//! This module provides system-level utilities for troubleshooting, performance
4//! testing, network serving, and cryptographic operations.
5//!
6//! # Available Commands
7//!
8//! ## Diagnostics (feature = "diagnostics")
9//!
10//! - [`doctor`]: Run comprehensive system diagnostics
11//! - Check for required dependencies (QEMU, KVM, FUSE)
12//! - Verify storage backend connectivity
13//! - Test compression and encryption functionality
14//!
15//! - [`mod@bench`]: Benchmark archive performance
16//! - Measure read throughput at various block sizes
17//! - Test cache effectiveness
18//! - Profile compression/decompression speed
19//!
20//! ## Network Serving (feature = "server")
21//!
22//! - [`serve`]: Serve archives over network protocols
23//! - NBD (Network Block Device) protocol
24//! - S3-compatible API
25//! - HTTP range requests
26//!
27//! ## Cryptographic Operations (feature = "signing")
28//!
29//! - [`keygen`]: Generate Ed25519 signing key pairs
30//! - [`sign`]: Sign archives with private keys
31//! - [`verify`]: Verify archive signatures with public keys
32//!
33//! # Usage Examples
34//!
35//! ```bash
36//! # Check system health
37//! hexz sys doctor
38//!
39//! # Benchmark an archive
40//! hexz sys bench snapshot.hxz --threads 8 --duration 60
41//!
42//! # Serve via NBD
43//! hexz sys serve snapshot.hxz --nbd --port 10809
44//!
45//! # Generate and use signing keys
46//! hexz sys keygen --output-dir ~/.hexz/keys
47//! hexz sys sign --key ~/.hexz/keys/private.key snapshot.hxz
48//! hexz sys verify --key ~/.hexz/keys/public.key snapshot.hxz
49//! ```
50//!
51//! # Feature Flags
52//!
53//! These commands require specific feature flags to be enabled at compile time:
54//! - `diagnostics`: doctor, bench
55//! - `server`: serve
56//! - `signing`: keygen, sign, verify
57
58#[cfg(feature = "diagnostics")]
59pub mod doctor;
60
61#[cfg(feature = "diagnostics")]
62pub mod bench;
63
64#[cfg(feature = "server")]
65pub mod serve;
66
67#[cfg(feature = "signing")]
68pub mod keygen;
69
70#[cfg(feature = "signing")]
71pub mod sign;
72
73#[cfg(feature = "signing")]
74pub mod verify;