Skip to main content

Crate ocidir

Crate ocidir 

Source
Expand description

§ocidir

Crates.io

docs.rs

§Read and write to OCI image layout directories

This library contains medium and low-level APIs for working with OCI images, which are basically a directory with blobs and JSON files for metadata.

§Dependency on cap-std

This library makes use of cap-std to operate in a capability-oriented fashion. In practice, the code in this project is well tested and would not traverse outside its own path root. However, using capabilities is a generally good idea when operating in the container ecosystem, in particular when actively processing tar streams.

§Examples

To access an existing OCI directory:

let d = cap_std::fs::Dir::open_ambient_dir("/path/to/ocidir", cap_std::ambient_authority())?;
let d = ocidir::OciDir::open(d)?;
println!("{:?}", d.read_index()?);

Re-exports§

pub use cap_std_ext::cap_std;
pub use oci_spec;

Modules§

prelude
Re-exports of commonly used traits.

Structs§

ArchiveReader
A reader for a region of a file, using pread for concurrent access.
Blob
Completed blob metadata
BlobWriter
Create an OCI blob.
Layer
Completed layer metadata
LayerWriter
A writer for a layer.
OciArchive
A read-only OCI image stored as a tar archive.
OciDir
An opened OCI directory.
ResolvedManifest
Result of resolving a manifest for a specific platform.

Enums§

Error
Errors returned by this crate.

Traits§

OciRead
Read-only access to an OCI image store.
WriteComplete
A writer that can be finalized to return an inner writer.

Type Aliases§

Result
The error type returned from this crate.