Skip to content

rust sdk: assert on the layout of header entries#43774

Merged
mathetake merged 1 commit intoenvoyproxy:mainfrom
akonradi:rust-assert-layout-compat
Mar 4, 2026
Merged

rust sdk: assert on the layout of header entries#43774
mathetake merged 1 commit intoenvoyproxy:mainfrom
akonradi:rust-assert-layout-compat

Conversation

@akonradi
Copy link
Copy Markdown
Contributor

@akonradi akonradi commented Mar 4, 2026

Commit Message:
The Rust compiler doesn't guarantee that the layout of slices won't change. Add a type to encapsulate the unsafeness and assert that the transformation is safe in debug builds.

Additional Description:
Risk Level: low, this only adds assertions to catch future incompatibilities
Testing: ran unit tests locally
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

mathetake
mathetake previously approved these changes Mar 4, 2026
Copy link
Copy Markdown
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@mathetake
Copy link
Copy Markdown
Member

i think rust fmt is failing

agrawroh
agrawroh previously approved these changes Mar 4, 2026
The Rust compiler doesn't guarantee that the layout of slices won't
change. Add a type to encapsulate the unsafeness and assert that the
transformation is safe in debug builds.

Signed-off-by: Alex Bakon <abakon@netflix.com>
@akonradi akonradi dismissed stale reviews from agrawroh and mathetake via 626c322 March 4, 2026 22:43
@akonradi akonradi force-pushed the rust-assert-layout-compat branch from c07ada9 to 626c322 Compare March 4, 2026 22:43
@mathetake mathetake enabled auto-merge (squash) March 4, 2026 22:44
@mathetake mathetake merged commit aa1297a into envoyproxy:main Mar 4, 2026
28 checks passed
bmjask pushed a commit to bmjask/envoy that referenced this pull request Mar 14, 2026
Commit Message:
The Rust compiler doesn't guarantee that the layout of slices won't
change. Add a type to encapsulate the unsafeness and assert that the
transformation is safe in debug builds.

Additional Description:
Risk Level: low, this only adds assertions to catch future
incompatibilities
Testing: ran unit tests locally
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Alex Bakon <abakon@netflix.com>
Signed-off-by: bjmask <11672696+bjmask@users.noreply.github.com>
bvandewalle pushed a commit to bvandewalle/envoy that referenced this pull request Mar 17, 2026
Commit Message:
The Rust compiler doesn't guarantee that the layout of slices won't
change. Add a type to encapsulate the unsafeness and assert that the
transformation is safe in debug builds.

Additional Description:
Risk Level: low, this only adds assertions to catch future
incompatibilities
Testing: ran unit tests locally
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Alex Bakon <abakon@netflix.com>
fishcakez pushed a commit to fishcakez/envoy that referenced this pull request Mar 25, 2026
Commit Message:
The Rust compiler doesn't guarantee that the layout of slices won't
change. Add a type to encapsulate the unsafeness and assert that the
transformation is safe in debug builds.

Additional Description:
Risk Level: low, this only adds assertions to catch future
incompatibilities
Testing: ran unit tests locally
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a

Signed-off-by: Alex Bakon <abakon@netflix.com>
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.

3 participants