TIP-143: Add serde feature - #9
Open
SoxPopuli wants to merge 1 commit into
Open
Conversation
SoxPopuli
force-pushed
the
csmith/add-serde-feature/vmlltrplxopq
branch
from
September 2, 2026 10:53
b4f1bdc to
4a54f7e
Compare
SoxPopuli
marked this pull request as ready for review
September 2, 2026 10:54
SoxPopuli
force-pushed
the
csmith/add-serde-feature/vmlltrplxopq
branch
from
September 2, 2026 13:44
4a54f7e to
78ee590
Compare
| feature = "serde", | ||
| serde(bound( | ||
| serialize = "K: serde::Serialize, V: serde::Serialize, ST: serde::Serialize", | ||
| deserialize = "K: serde::Deserialize<'de>, V: serde::Deserialize<'de>, ST: serde::Deserialize<'de>", |
Collaborator
There was a problem hiding this comment.
To protect against maliciously crafted payloads, we'll want to return an error if internal inconsistencies are detected during deserialization.
- Array sizes for keys and values should be the same, and should match with the maximum possible
Mphfoutput (perhaps a new method onMphf/RankedBitsto calculate the maximum value). - Indexes (e.g., in
values_index) must be in-bounds for the maximum length.
We'll need similar checks on the preconditions of Mphf and RankedBits.
Alternatively, we could document that the library should only deserialize payloads from trusted sources.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds serde optional feature for non-rkyv (de)serialization.
Should be rebased after #8 is merged to fix CI