bincode-org / bincode

A binary encoder / decoder implementation in Rust.
MIT License
2.69k stars 272 forks source link

Support for the "bytes" crate #650

Closed aegroto closed 1 year ago

aegroto commented 1 year ago

Referring to bincode v2, I can see that Encode and Decode are not implemented for bytes types. Is it intentional or is there a chance to add implementations for those types? I am willing to contribute if this is something that could be of interest for the community.

VictorKoenders commented 1 year ago

Ideally we would want to have other crates implement bincode, instead of bincode implementing all of the crates in the rust ecosystem.

Have you tried using #[bincode(with_serde)] as described here? I wonder if that will give an ergonomic-enough API for you to work with.

We'll run into issues when we finally release bincode 2.0 and other crates are thinking of implementing bincode in their crate, but bincode also provides an implementation.

aegroto commented 1 year ago

Hello, sorry for the late reply. Thanks for your suggestion, I have not tried to encode bytes objects by relying on serde, but I will port my code to do so and let you know as soon as possible.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

aegroto commented 1 year ago

Sorry for the lack of updates, I didn't have any time to test out the proposed solution yet. Is there any ETA for bincode v2?

VictorKoenders commented 1 year ago

There is no ETA for bincode v2, all the maintainers have been very busy with non-OSS things this year

aegroto commented 1 year ago

Thanks for your response @VictorKoenders. Is there any checklist of what's missing and priorities for the release? If so, I will to have a look at that.

VictorKoenders commented 1 year ago

Basically all issues that are labeled with bincode-2

aegroto commented 1 year ago

Thanks, I will give a look at it as soon as I can.