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

Remove abomonation to reduce unsoundness #575

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

frankmcsherry
Copy link
Member

The unsafe keyword is the source of unsoundness in Rust, and we would like to minimize it. One particular villain (by its own admission) is abomonation, which provides unsafe serialization and deserialization in the name of performance. Although performance is great, the unsoundness that results from using unsafe is not.

This PR does not evaluate any performance considerations, nor does it even test whether bincode is a suitable replacement in the contexts in which it is used. Probably worth shaking that out before merging anything.

Copy link
Member

@antiguru antiguru left a comment

Choose a reason for hiding this comment

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

Looks good! There are some logging types that implemented abomination, but don't support serde. Should they? We might not cover their construction and serialization in any of the tests.

communication/src/allocator/zero_copy/push_pull.rs Outdated Show resolved Hide resolved
communication/src/allocator/zero_copy/push_pull.rs Outdated Show resolved Hide resolved
communication/src/logging.rs Outdated Show resolved Hide resolved
@frankmcsherry
Copy link
Member Author

Rebased, and I think that all types that previously derived Abomonation now derive both Serialize and Deserialize. In the future there could be different traits to use (e.g. Columnable, or some other way of communicating "there is a SOA representation that can be memcpy'd around"), but .. I think we are good-ish to go?

@frankmcsherry frankmcsherry merged commit f54796a into TimelyDataflow:master Sep 9, 2024
1 check passed
@frankmcsherry
Copy link
Member Author

Thanks for the review!

@github-actions github-actions bot mentioned this pull request Oct 29, 2024
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.

2 participants