Skip to main content

Crate microsandbox_image

Crate microsandbox_image 

Source
Expand description

OCI image pulling, EROFS materialization, and caching for microsandbox.

This crate implements the OCI image lifecycle:

  • Registry communication (pull, auth, platform resolution)
  • Layer caching with content-addressable dedup
  • Tar ingestion into in-memory file trees
  • EROFS filesystem image generation (per-layer and flat modes)
  • ext4 upper disk formatting for writable overlay upper layer
  • Minimal EROFS reader for Append patches

Modules§

erofs
ext4
snapshot
Snapshot artifact format.
tar
tree

Structs§

CachedImageMetadata
Cached metadata for a pulled image reference.
CachedLayerMetadata
Cached metadata for a single layer descriptor.
Digest
OCI content-addressable digest (e.g., sha256:e3b0c44298fc1c14...).
GlobalCache
On-disk global cache for OCI layers and EROFS images.
ImageConfig
Runtime configuration parsed from an OCI image config blob.
ImageLoadOptions
Options for importing image archives.
ImageSaveConfig
Config fields used when synthesizing an exported Docker image config.
ImageSaveLayer
Layer data used when exporting an image.
ImageSaveRequest
Image data needed to export a Docker archive.
LoadedImage
One loaded image reference and its cached metadata.
Platform
Target platform for OCI image resolution.
PullOptions
Options for Registry::pull().
PullProgressHandle
Receiver for progress events.
PullProgressSender
Emits progress events. Uses try_send — never blocks downloads.
PullResult
Result of a successful image pull.
Reference
Reference provides a general type to represent any way of referencing images within an OCI registry.
Registry
OCI registry client with platform resolution, caching, and progress reporting.
RegistryBuilder
Builder for constructing a Registry client with optional auth and TLS settings.

Enums§

ImageArchiveFormat
Archive format to use when saving images.
ImageError
Errors that can occur during image operations.
PullPolicy
Controls when the registry is contacted for manifest freshness.
PullProgress
Progress events emitted during image pull and EROFS materialization.
RegistryAuth
Authentication credentials for OCI registry access.

Functions§

load_archive
Load a Docker image archive into the microsandbox image cache.
progress_channel
Create a progress channel pair.
save_archive
Save images as a container image archive.
save_docker_archive
Save images as a Docker-compatible image archive.

Type Aliases§

Arch
Re-export of oci_spec::image::Arch.
ImageResult
Result type for image operations.
Os
Re-export of oci_spec::image::Os.