Skip to content

Derive zerocopy traits on Archivedf16 and Archivedbf16#150

Open
AlJohri wants to merge 1 commit into
VoidStarKat:mainfrom
AlJohri:zerocopy-on-archived-f16-slim
Open

Derive zerocopy traits on Archivedf16 and Archivedbf16#150
AlJohri wants to merge 1 commit into
VoidStarKat:mainfrom
AlJohri:zerocopy-on-archived-f16-slim

Conversation

@AlJohri

@AlJohri AlJohri commented Jun 9, 2026

Copy link
Copy Markdown

Derives zerocopy::FromBytes / IntoBytes / Immutable / KnownLayout on Archivedf16 / Archivedbf16 when the rkyv feature is enabled, so the archived types work with zerocopy's safe APIs (e.g. zerocopy::Ref::from_bytes).

With the `rkyv` feature enabled, derive `zerocopy::FromBytes`,
`IntoBytes`, `Immutable`, and `KnownLayout` on the generated
`Archivedf16` / `Archivedbf16` so they can be used with zerocopy's safe
APIs (e.g. `zerocopy::Ref::from_bytes`).

The archived types wrap `rend`'s little-endian primitives, and
zerocopy's traits are sealed (no manual `unsafe impl`), so the derive
needs those inner types to already implement them. The `rkyv` feature
therefore also pulls in `rend` directly with its `zerocopy-0_8` feature.
@AlJohri AlJohri force-pushed the zerocopy-on-archived-f16-slim branch from 1624bed to db77515 Compare June 15, 2026 20:02
@AlJohri AlJohri marked this pull request as ready for review June 15, 2026 20:08
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