Expand description
§ocidir
§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()?.ok_or_else(|| anyhow!("missing Image Index"))?);
Re-exports§
Structs§
- Blob
- Completed blob metadata
- Blob
Writer - Create an OCI blob.
- Gzip
Layer Writer - Create an OCI tar+gzip layer.
- Layer
- Completed layer metadata
- OciDir
- An opened OCI directory.
Enums§
- Error
- Errors returned by this crate.
Functions§
- new_
empty_ manifest - Generate a “valid” empty manifest. See above.
- write_
json_ blob Deprecated - Write a serializable data (JSON) as an OCI blob
Type Aliases§
- Result
- The error type returned from this crate.