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

Support zerocopy #325

Closed
qwandor opened this issue Mar 29, 2023 · 4 comments
Closed

Support zerocopy #325

qwandor opened this issue Mar 29, 2023 · 4 comments

Comments

@qwandor
Copy link

qwandor commented Mar 29, 2023

As per #310, for users of bitflags to continue being able to derive zerocopy traits on bitflags-generated types, it appears that there will need to be a cargo feature flag to make the internal bitflags types derive the relevant zerocopy traits.

@KodrAus
Copy link
Member

KodrAus commented Apr 3, 2023

We should come up with a strategy for supporting these unstable libraries. I've opened #329 to come up with one.

@KodrAus
Copy link
Member

KodrAus commented May 4, 2023

Having spent some time trying to make zerocopy supportable in bitflags I've come to the conclusion that we won't be able to directly support any libraries that require custom derives.

I am working on a general solution to this though so that you can partially "eject" your flags definition and can add derives for libraries bitflags doesn't directly support without losing all the nice codegen. It currently looks like this.

@qwandor
Copy link
Author

qwandor commented May 5, 2023

Thanks for looking into this!

@KodrAus
Copy link
Member

KodrAus commented May 17, 2023

Thanks for checking this out @qwandor 👍

As per #326 (comment), we can now work with zerocopy without needing to support it directly in bitflags.

@KodrAus KodrAus closed this as completed May 17, 2023
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 a pull request may close this issue.

2 participants