Skip to main content

Crate composefs_oci

Crate composefs_oci 

Source
Expand description

OCI container image support for composefs.

This crate provides functionality for working with OCI (Open Container Initiative) container images in the context of composefs. It enables importing, extracting, and mounting container images as composefs filesystems with fs-verity integrity protection.

Key functionality includes:

  • Pulling container images from registries using skopeo
  • Converting OCI image layers from tar format to composefs split streams
  • Creating mountable filesystems from OCI image configurations
  • Importing from containers-storage with zero-copy reflinks (optional feature)

Re-exports§

pub use boot::boot_image;
pub use boot::remove_boot_image;
pub use oci_image::ImageInfo;
pub use oci_image::LayerInfo;
pub use oci_image::OCI_REF_PREFIX;
pub use oci_image::OciFsckError;
pub use oci_image::OciFsckResult;
pub use oci_image::OciImage;
pub use oci_image::OciImageNotFound;
pub use oci_image::OciRefNotFound;
pub use oci_image::SplitstreamInfo;
pub use oci_image::add_referrer;
pub use oci_image::layer_dumpfile;
pub use oci_image::layer_info;
pub use oci_image::layer_tar;
pub use oci_image::list_images;
pub use oci_image::list_referrers;
pub use oci_image::list_refs;
pub use oci_image::oci_fsck;
pub use oci_image::oci_fsck_image;
pub use oci_image::remove_referrer;
pub use oci_image::remove_referrers_for_subject;
pub use oci_image::resolve_ref;
pub use oci_image::tag_image;
pub use oci_image::untag_image;
pub use skopeo::pull_image;
pub use composefs;

Modules§

boot
Boot image management for OCI containers.
cstor
containers-storage integration for zero-copy layer import.
image
OCI image processing and filesystem construction.
layer
Shared layer import logic for OCI container images.
oci_image
OCI image and artifact storage for composefs.
oci_layout
Direct OCI layout directory import without the skopeo proxy.
progress
Re-exported from composefs::progress; use that path directly in new code.
skopeo
Container image pulling and registry interaction via skopeo/containers-image-proxy.
tar
TAR archive processing and split stream conversion.

Structs§

ComponentId
Identity of a component being tracked, typically an OCI layer diff_id or an HTTP object path.
ImportStats
Statistics from an image import operation.
NullReporter
A no-op reporter that discards all events.
OciDigest
OCI content-addressable digest type (e.g. sha256:abcd...).
OpenConfig
Parsed OCI config and its associated references.
PullOptions
Options for a pull operation.
PullResult
Result of a pull operation.
UpgradeResult
Result of a repository upgrade operation.

Enums§

LocalFetchOpt
Controls whether and how the containers-storage: native import path is used when pulling images.
ProgressEvent
Events emitted during a pull or download operation.

Constants§

BOOT_IMAGE_REF_KEY
Named ref key for the V2 boot EROFS image derived from this OCI config.
BOOT_IMAGE_REF_KEY_V1
Named ref key for the V1 boot EROFS image derived from this OCI config.
IMAGE_REF_KEY
Named ref key for the V2 EROFS image derived from this OCI config.
IMAGE_REF_KEY_V1
Named ref key for the V1 EROFS image derived from this OCI config.

Traits§

ProgressReporter
Receives progress events from a pull or download operation.

Functions§

composefs_boot_erofs_for_config
Returns the boot EROFS ObjectID for version from the given OCI config, if any.
composefs_boot_erofs_for_manifest
Returns the boot EROFS ObjectID for an OCI image identified by manifest, if any.
composefs_erofs_for_config
Returns the composefs EROFS ObjectID for version referenced by the given OCI config, if any.
composefs_erofs_for_manifest
Returns the composefs EROFS ObjectID for an OCI image identified by manifest, if any.
import_layer
Imports a container layer from a tar stream into the repository.
open_config
Opens and parses a container configuration.
pull
Pull the target image, and add the provided tag. If this is a mountable image (i.e. not an artifact), it is not unpacked by default.
upgrade_repo
Upgrades all tagged OCI images in the repository to the current format.
write_config
Writes a container configuration to the repository.
write_config_raw
Rewrites a container configuration in the repository from raw JSON bytes.

Type Aliases§

ContentAndVerity
A tuple of (content digest, fs-verity ObjectID).
SharedReporter
Convenience type alias for a shared, type-erased progress reporter.