vers icon indicating copy to clipboard operation
vers copied to clipboard

Zerocopy RsVec

Open somethingelseentirely opened this issue 1 year ago • 4 comments

This adds a zerocopy capabilities based on the anybytes crate.

somethingelseentirely avatar Sep 18 '24 09:09 somethingelseentirely

That could probably use a forced rebase

Cydhra avatar Sep 18 '24 09:09 Cydhra

Sorry, completely forgot to clean it up after all the other changes happened 🙇‍♂️ 😅 (The failing tests in the CI are because of the serde/zerocopy incompability.)

somethingelseentirely avatar Sep 18 '24 09:09 somethingelseentirely

No, PackedSlice doesn't implement Index and has no len() method, thats why the tests fail

Cydhra avatar Sep 18 '24 14:09 Cydhra

I think that's a follow-up error, unless I'm missing something. PackedSlice implements

impl<T> AsRef<[T]> for PackedSlice<T>
where
    T: FromBytes,

but with the serde feature enabled, FromBytes and AsBytes don't get derived, so the blanket implementation won't exist, so it doesn't have Index or len().

somethingelseentirely avatar Sep 18 '24 15:09 somethingelseentirely

Closing because the feature progress is stale. Furthermore, it is still unclear how this feature should look like, since it cannot be added as a drop-in for serde.

Cydhra avatar Jun 28 '25 12:06 Cydhra