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

Use packedstruct instead of unsafe transmuation #10

Open
dberlin opened this issue Mar 7, 2023 · 0 comments
Open

Use packedstruct instead of unsafe transmuation #10

dberlin opened this issue Mar 7, 2023 · 0 comments

Comments

@dberlin
Copy link

dberlin commented Mar 7, 2023

Hey,
Nice crate - i hacked it up a bit to try to make it safer.

Most (but not all) of the unsafe usage is around trying to convert various structures into various byte representations and back.
Or make bitwise copies of non-Copy structures, etc.

For those cases, the packed_struct crate can be used to do it without pain or unsafe code.

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

1 participant