dimforge / parry

2D and 3D collision-detection library for Rust.
https://parry.rs
Apache License 2.0
567 stars 100 forks source link

add rkyv-safe-deser feature for deriving CheckBytes on Archive types #130

Closed samlich closed 1 year ago

samlich commented 1 year ago

Fixes #128: Derives CheckBytes on archived types generated by rkyv, so that rkyv's safe deserialization can be used.

Adds feature rkyv-safe-deser, as that's how it's named in Nalgebra.

The Nalgebra feature is marked as for tests, and it seems its regular rkyv-serialize feature already derives CheckBytes, so I didn't add that as a dependency.

SIMD will work, once a patch is added to Simba, but first one needs to be added to Packed-simd.

sebcrozet commented 1 year ago

Thank you for this PR! Since CheckBytes impls are always enabled in nalgebra when rkyv is, I changes this PR do the same here instead of adding a new feature. That rkyv-safe-deser is a leftover from some debugging and should be removed now.