termoshtt / ocipkg

An OCI registry client for Rust desiged to use distribute static library as a "container"
Apache License 2.0
48 stars 8 forks source link

Create Utility to get Bytes of a Layer. #94

Closed CodeMan99 closed 6 months ago

CodeMan99 commented 10 months ago

Replaces #93 - I was reaching for the wrong abstraction.

Why

I want to be able to work with arbitrary layers. The custom layer types of devcontainers specifically.

Provide

It seems like providing the bytes of a given layer is the least opinionated way to handle this.

Additional

This uses oci_spec::image::MediaType as the callback argument for filtering. Worth considering exposing that value for easier usage.

termoshtt commented 6 months ago

Merged though #96. Thanks!