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

Add repr(C) attribute for State type #6

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

austinhartzheim
Copy link
Contributor

Struct memory layout can change between Rust compiler versions fpr #[repr(Rust)] structs. Because we persist the State struct to disk, we should fix the layout with #[repr(C)] to prevent potential incompatibility.

Testing on x86_64 and aarch64 shows no layout differences with this change.

@bocharov bocharov merged commit 1d142f0 into cloudflare:main Sep 28, 2023
4 checks passed
@austinhartzheim austinhartzheim deleted the state-repr-c branch September 28, 2023 23:28
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.

None yet

2 participants