feat: add rkyv and bytecheck features with a combined rkyv-full#168
Conversation
6d2405c to
7a5e076
Compare
|
Ah, good, I tried this back in rkyv-0.7 and was unhappy with it, but 0.8 is much cleaner. The copy optimization helps a lot. Only two things I'd like to change. Add the version number to the crate features, like |
|
Sorry about the failing import, I was getting a clippy lint about the unused import and just deleted it, not thinking about the fact that it was probably used in a cfged out test. And it makes sense to have the dependency be version specific, I hope I won't have to be back here at some point to make another PR but for a crate as used as GenericArray better safe than sorry (and from what I can tell you've had your own issues with the 0.14 situation). Thanks for being open to this! |
|
I’ll merge this in the morning. Implementation looks good. |
|
Published in 1.4.2. Thanks! |
|
Awesome! ty for the quick merge and release |
Thank you for this really useful crate, has made it possible for me to work around the current 'state' of Const Generics in Rust.
rkyvis a really cool zero copy serialization/deserialization crate with ~110 million downloads, and it would be really nice to have GenericArray have direct support for it rather than having to wrap it downstream with a wrapper and potentially incorrect implementationsThe implementations are 1:1 copies of the respective impls for [T; N]. For rkyv they are taken from here, and for bytecheck they are taken from here.
The reason this is a single commit is that these two are almost always going to be used together, but the crates are distinct, and the joint dependency shouldn't be enforced.
Let me know if you have any feedback or suggestions on what to improve.