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

Make zerocopy optional #253

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mitsuhiko
Copy link

@mitsuhiko mitsuhiko commented Feb 5, 2025

Feel free to disregard this. I was wondering if there is a way to make zerocopy optional. It's actually not all that hard, since most of Convert is actually not used. However you end up with a fair bit if not nice looking code which I think is inappropriate compared to what zerocopy achieves.

However that got me thinking that it might be interesting to make zerocopy a CI only thing, or something a user can opt-into. Since all the transmutes are internal, it's shielded from the public API anyways. For as long as the code passes zerocopy checks, the transmutes are fine and zerocopy is not needed for distribution.

Reason for why I want to avoid zerocopy for now: zerocopy is work in progress and I currently end up with more than one zerocopy version in my dependency, in part because ahash has not moved up yet (#246). To avoid some extra churn I was thinking it might be interesting to see if it can be made optional.

Refs #180

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.

1 participant