rust-oci-client icon indicating copy to clipboard operation
rust-oci-client copied to clipboard

Split Reference into a separate crate

Open cgwalters opened this issue 1 year ago • 4 comments

Hi, any opinion on splitting https://github.com/oras-project/rust-oci-client/blob/main/src/reference.rs into a separate crate ("oci-reference" e.g.)? It'd be a natural thing to use in https://github.com/containers/containers-image-proxy-rs which is a different way to fetch container images but wraps with a Rust API.

cgwalters avatar Aug 18 '24 14:08 cgwalters

Or actually, is there a reason this crate doesn't depend on https://github.com/containers/oci-spec-rs ? If it did then we could just move the reference type there, cc https://github.com/containers/oci-spec-rs/issues/205

cgwalters avatar Aug 28 '24 13:08 cgwalters

I've been thinking about moving Reference to a dedicated crate. I've a couple of project that just need this portion of the whole oci-client crate.

I would be fine moving the code to oci-spec-rs too.

What do you think @thomastaylor312 ?

flavio avatar Aug 29 '24 06:08 flavio

This was already asked for in #102 and I am also completely fine with having the reference stuff be external from this crate. The main issue here is getting the time to do this. So I am completely on board with moving to the oci-spec-rs since it helps us avoid redefining types and makes things more unified. But it is going to be a major change that would also affect dependent projects. So we have to do the work to integrate oci-spec-rs into this repo, add the reference stuff into oci-spec-rs, and then cut a new release with a warning that the types are breaking.

I personally don't have time to do that in at least the next month, so if someone is willing to work on it, I'd be more than willing to review the PR and get it merged

thomastaylor312 avatar Aug 29 '24 17:08 thomastaylor312

First step in https://github.com/containers/oci-spec-rs/pull/207

cgwalters avatar Aug 30 '24 12:08 cgwalters