Skip to main content

microsandbox_image/
lib.rs

1//! OCI image pulling, EROFS materialization, and caching for microsandbox.
2//!
3//! This crate implements the OCI image lifecycle:
4//! - Registry communication (pull, auth, platform resolution)
5//! - Layer caching with content-addressable dedup
6//! - Tar ingestion into in-memory file trees
7//! - EROFS filesystem image generation (per-layer and flat modes)
8//! - ext4 upper disk formatting for writable overlay upper layer
9//! - Minimal EROFS reader for Append patches
10
11// New lints introduced in rustc 1.95 fire on existing code; cleanup
12// tracked separately.
13#![allow(
14    clippy::identity_op,
15    clippy::useless_conversion,
16    clippy::needless_update
17)]
18
19mod auth;
20mod config;
21pub(crate) mod crc32c;
22mod digest;
23pub mod erofs;
24mod error;
25pub mod ext4;
26pub mod filetree;
27pub(crate) mod layer;
28pub(crate) mod lock;
29mod manifest;
30mod platform;
31mod progress;
32mod pull;
33mod registry;
34pub mod snapshot;
35mod store;
36pub mod tar_ingest;
37pub mod vmdk;
38
39//--------------------------------------------------------------------------------------------------
40// Re-Exports
41//--------------------------------------------------------------------------------------------------
42
43pub use auth::RegistryAuth;
44pub use config::ImageConfig;
45pub use digest::Digest;
46pub use error::{ImageError, ImageResult};
47pub use oci_client::Reference;
48pub use platform::{Arch, Os, Platform};
49pub use progress::{PullProgress, PullProgressHandle, PullProgressSender, progress_channel};
50pub use pull::{PullOptions, PullPolicy, PullResult};
51pub use registry::{Registry, RegistryBuilder};
52pub use store::{CachedImageMetadata, CachedLayerMetadata, GlobalCache};