Skip to content

Use zerocopy or similar library to replace into()s with transmute!s? #108

@itsjunetime

Description

@itsjunetime

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    qualityImprove the quality of the code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions