1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! FlashKraft Core
//!
//! This crate contains all shared, framework-free logic that is reused by
//! both the Iced desktop GUI (`flashkraft-gui`) and the Ratatui TUI
//! (`flashkraft-tui`).
//!
//! ## Contents
//!
//! | Module | What lives here |
//! |--------|-----------------|
//! | [`domain`] | Domain models — [`DriveInfo`], [`ImageInfo`], drive constraints |
//! | [`flash_helper`] | In-process flash pipeline — [`run_pipeline`], [`FlashEvent`], [`FlashStage`] |
//! | [`commands`] | Async helpers — drive detection |
//! | [`utils`] | Debug-logging macros (`debug_log!`, `flash_debug!`, …) |
//!
//! ## Dependency policy
//!
//! This crate intentionally has **no** GUI or TUI dependencies (no `iced`,
//! no `ratatui`, no `crossterm`). It may only depend on:
//! - OS / system crates (`sysinfo`, `nix`, `sha2`, …)
//! - Async utilities (`tokio`, `futures`, `futures-timer`)
//! - Persistence (`redb`, `dirs`)
// Utility macros must be declared first so they are available to every
// subsequent module via the implicit `#[macro_use]` on the crate root.
// ── Convenience re-exports ────────────────────────────────────────────────────
pub use ;
pub use fmt_bytes;
/// Re-export the flash pipeline event types so consumers only need to import
/// from `flashkraft_core` rather than the sub-module path.
pub use ;