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

rkyv support #165

Open
stefnotch opened this issue Nov 21, 2023 · 2 comments
Open

rkyv support #165

stefnotch opened this issue Nov 21, 2023 · 2 comments

Comments

@stefnotch
Copy link
Contributor

I was wondering if you'd consider adding rkyv support to this library, of course behind a feature flag?

Hopefully all that would need to be done is deriving the types, and everything works. I would also prepare a PR with that if wanted.

@fu5ha
Copy link
Owner

fu5ha commented Nov 21, 2023

Hey, yes I would definitely consider it. Some care would need to be taken though or it might be a bit of a waste... I think ideally, when the rkyv feature flag is enabled all the types would have their <T as rkyv::Archive>::Archived type be Self. That way you could do math operations directly on the loaded archived form. Otherwise if you have to deserialize to actually do anything it would be a bit of a waste of rkyv's power.

To accomplish that properly we'd need to also add #[repr(C)] on things when the rkyv feature is on and maybe even add support to the underlying vector types in wide, if we want to support simd wide vectors too.

@stefnotch
Copy link
Contributor Author

stefnotch commented Nov 21, 2023

Hey, yes I would definitely consider it. Some care would need to be taken though or it might be a bit of a waste... I think ideally, when the rkyv feature flag is enabled all the types would have their <T as rkyv::Archive>::Archived type be Self. That way you could do math operations directly on the loaded archived form.

That would definitely be awesome. I'm not certain if that's fully possible at the moment, due to endian-ness rkyv/rkyv#292 .
(And sadly the official documentation chapter 18.1. Impl duplication hasn't been written yet either https://rkyv.org/ )

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

No branches or pull requests

2 participants