| Crates.io | oci-core |
| lib.rs | oci-core |
| version | 0.1.2 |
| created_at | 2025-11-21 16:56:55.809748+00 |
| updated_at | 2025-12-26 06:22:09.264628+00 |
| description | Lightweight OCI registry primitives extracted from docker-image-pusher |
| homepage | |
| repository | https://github.com/yorelog/docker-image-pusher |
| max_upload_size | |
| id | 1943820 |
| size | 102,839 |
oci-core is a lightweight, MIT-licensed OCI registry utility library extracted from
docker-image-pusher. The crate focuses on providing the minimum set of
building blocks required to authenticate with registries, inspect references,
and upload blobs and manifests in a fully asynchronous manner.
Reference parser with clear error semantics (OciError).Client built on top of reqwest and tokio that supports
chunked uploads, upload resumption, and manifest/config pushes.Add the crate as a dependency from a sibling workspace member:
[dependencies]
oci-core = { path = "../oci-core" }
Then create a client and authenticate against a registry:
use oci_core::{auth::RegistryAuth, client::{Client, ClientConfig}, reference::Reference};
let client = Client::new(ClientConfig::default());
let target: Reference = "registry.example.com/tools/app:latest".parse()?;
let auth = RegistryAuth::basic("user", "secret");
// start pushing blobs...
oci-core is distributed under the MIT license (see LICENSE).