Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zerocopy RsVec #14

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

somethingelseentirely
Copy link
Contributor

This adds a zerocopy capabilities based on the anybytes crate.

@Cydhra
Copy link
Owner

Cydhra commented Sep 18, 2024

That could probably use a forced rebase

@somethingelseentirely
Copy link
Contributor Author

somethingelseentirely commented Sep 18, 2024

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.)

@Cydhra
Copy link
Owner

Cydhra commented Sep 18, 2024

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

@somethingelseentirely
Copy link
Contributor Author

somethingelseentirely commented Sep 18, 2024

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().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants