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

feat: implement bytemuck for plugin header loading #213

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

VolodymyrBg
Copy link

feat: implement bytemuck for plugin header loading

Description:
This PR implements bytemuck for safer type punning when loading plugin headers. Changes include:

  • Added bytemuck::Pod and bytemuck::Zeroable implementations for PluginHeaderV1 and Key
  • Added InvalidPluginHeader error variant to handle bytemuck conversion failures
  • Updated plugin header loading in utils.rs to use bytemuck instead of manual loading
  • Improved type safety by using compile-time checked type punning

The changes make the code safer by using bytemuck's compile-time checked type punning instead of manual loading, which helps prevent potential memory safety issues.

Copy link

vercel bot commented Jan 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mpl-core-js-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 18, 2025 10:58am

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