feat(primitives): implement serde for Elf type#2691
Open
gabrielrondon wants to merge 1 commit into
Open
Conversation
ecol-master
approved these changes
Apr 6, 2026
|
Hello, @gabrielrondon , please update your branch to main |
87ba0ac to
898c516
Compare
Implement `Serialize` and `Deserialize` for `sp1_primitives::Elf`, enabling storage in databases, caching, and passing through application boundaries without custom wrapper types. Both variants serialize as byte slices. Deserialization always produces the `Dynamic` variant since `Static` requires a `'static` lifetime that cannot be constructed from owned data. Closes succinctlabs#2689
898c516 to
203d6a2
Compare
Author
|
Rebased onto |
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.
Closes #2689
Summary
Implement
SerializeandDeserializeforsp1_primitives::Elf, replacing the// todo!(n)comment.Both variants serialize as byte slices. Deserialization always produces the
Dynamicvariant sinceStaticrequires a'staticlifetime that cannot be constructed from owned data.This enables storing compiled ELF artifacts in databases, caching them, and passing them through application boundaries using standard serde-compatible tooling.
Changes
Serialize/Deserializeimpl forElfincrates/primitives/src/types.rsserdeandbincode)