containers / ocidir-rs

Low level Rust library for working with OCI (opencontainers) directories
Apache License 2.0
4 stars 3 forks source link

Misc #9

Closed cgwalters closed 1 month ago

cgwalters commented 1 month ago

read_json_blob: Drop unnecessary constraints

Just noted this while scrolling by.

Signed-off-by: Colin Walters walters@verbum.org


lib: Create a const for sha256

Just a cleanup.

Signed-off-by: Colin Walters walters@verbum.org


lib: Add an API to write layers with timestamps

I didn't have an immediate use case, I was just reading the code for unrelated reasons and noticed this.

But I'm sure we'd want this for reproducible builds.

Signed-off-by: Colin Walters walters@verbum.org


Add functions to query existence of manifests and blobs

This is useful for tooling that wants to check before e.g. fetching.

Signed-off-by: Colin Walters walters@verbum.org


Add a function to create a raw blob

This is needed for things that want to copy in external data.

Signed-off-by: Colin Walters walters@verbum.org


Automatically set gzip media type on layer descriptor

This is a sane thing to default.

Signed-off-by: Colin Walters walters@verbum.org


tofay commented 1 month ago

Add an API to write layers with timestamps

I'd find that useful in https://github.com/microsoft/rpmoci/blob/62939cf47a3fecca509fe6df16b6064247bd59d2/src/lockfile/build.rs#L87, where I avoided using push_layer due to the timestamp generation.