Skip to main content

arcbox_asset/
lib.rs

1//! Generic asset download, verification, and caching primitives.
2//!
3//! This crate provides the building blocks used by `arcbox-boot` (VM boot
4//! assets) and `arcbox-docker-tools` (Docker CLI binaries) for downloading
5//! files from the network, verifying SHA-256 checksums, and writing them
6//! atomically to a local cache.
7//!
8//! # Feature flags
9//!
10//! - **`download`** — enables the async download functions (pulls in `reqwest`,
11//!   `sha2`, `tokio`, `futures-util`).  Without this feature only the type
12//!   definitions (`progress`, `error`, `arch`) are available.
13
14pub mod arch;
15pub mod error;
16pub mod progress;
17
18#[cfg(feature = "download")]
19pub mod download;
20
21pub use arch::current_arch;
22pub use error::{AssetError, Result};
23pub use progress::{PreparePhase, PrepareProgress, ProgressCallback};