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 zerocopy or similar library to replace into()s with transmute!s? #108

Open
itsjunetime opened this issue Feb 10, 2025 · 1 comment
Open

Comments

@itsjunetime
Copy link
Collaborator

Hi, I've been looking into using this library for a project of mine and, although it's not a dealbreaker, I'm not a fan of some low-cost transformations that are being used right now to transform between FFI types and Rust types (e.g. Quad to fz_quad using Quad's From<fz_quad> impl).

I feel like a lot (if not all) of these transformations could be replaced with zerocopy's transmute (or at least proved to be safe and unlock other zero-cost transformations with zerocopy's traits). I've already implemented this in a few places in this codebase locally and think it could improve things.

Are you open to a PR that does this sort of thing?

@messense
Copy link
Owner

Pull requests are welcome!

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