google / google/zerocopy

Support `#[derive(IntoBytes)]` on unsized types

Open
#121 1 comment 1 reaction 0 assignees View on GitHub
compatibility-nonbreaking
Dominant language
Rust
Stars
2.6k
Forks
179
Avg merge
1d 19h
Merged PRs (30d)
29

Description

*See also: https://github.com/google/zerocopy/issues/2063#issuecomment-2672892894*

Currently, the code generated by our `IntoBytes` derive includes calls to `core::mem::size_of` in order to determine whether a type has padding (unless the type is `repr(transparent)` or `repr(packed)`). This prevents deriving `IntoBytes` on unsized non-`repr(transparent)`/`repr(packed)` types.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.