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.
design
How to create a composefs from an OCI image
image
OCI image processing and filesystem construction.
layer
Shared layer import logic for OCI container images.
layer_sync
Shared, content-agnostic splitdirfdstream producer and consumer for layer synchronisation.
layer_transport
Abstraction layer for the OCI GetLayer producer side.
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.
sealing_spec
OCI Sealing Specification for Composefs
skopeo
Container image pulling and registry interaction via skopeo/containers-image-proxy.
tar
TAR archive processing and split stream conversion.
varlink_types
Shared wire types and client proxy for the org.composefs.Oci interface.

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...).
OciTransformOptions
Options controlling FileSystem::transform_for_oci.
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.
XattrFiltering
Controls which extended attributes FileSystem::transform_for_oci keeps when processing a filesystem for OCI container image consistency.

Constants§

BLOB_CONTENT_TYPE
The content-type tag used to identify non-tar OCI artifact blob splitstreams in the repository.
BOOT_IMAGE_REF_KEY
Named ref key for the V2 boot EROFS image derived from this OCI config, built with the default XattrFiltering::AllowlistOnly mode.
BOOT_IMAGE_REF_KEY_V1
Named ref key for the V1 boot EROFS image derived from this OCI config, built with the default XattrFiltering::AllowlistOnly mode.
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.
LAYER_CONTENT_TYPE
The content-type tag used to identify OCI layer (tar) splitstreams in the repository.

Traits§

ProgressReporter
Receives progress events from a pull or download operation.

Functions§

composefs_boot_erofs_for_config
Returns the boot EROFS ObjectID for version built with the given xattr filtering mode, from the given OCI config, if any.
composefs_boot_erofs_for_manifest
Returns the boot EROFS ObjectID for version built with the given xattr filtering mode, 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.
extract_diff_ids
Extract ordered diff_ids from a config descriptor.
extract_layer_ids
Extract ordered layer identifiers from raw manifest and config JSON.
import_layer
Imports a container layer from a tar stream into the repository.
layer_content_id
Return the content-identifier string used to register a layer splitstream.
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.
sha256_content_digest
Compute the SHA-256 content digest of bytes, returning an OCI digest (e.g. sha256:abcd...).
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.