Skip to content

Conversation

mablr
Copy link
Contributor

@mablr mablr commented Aug 22, 2025

Motivation

Close #992

Solution

  • Added borsh as a dependency in Cargo.toml files for the main crate and primitives.
  • Implemented borsh serialization and deserialization macros in the primitives library.
  • Implemented borsh serialization and deserialization for FixedBytes

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

- Added borsh as a dependency in Cargo.toml files for the main crate and primitives.
- Implemented borsh serialization and deserialization macros in the primitives library.
- Implemented borsh serialization and deserialization for FixedBytes
Copy link
Contributor Author

@mablr mablr left a comment

Choose a reason for hiding this comment

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

Should we also implement Bytes ?

@mablr mablr changed the title feat(borsh): add borsh serialization support to primitives feat(primitives): add borsh serialization support to primitives Aug 22, 2025
@mablr mablr changed the title feat(primitives): add borsh serialization support to primitives feat(primitives): add borsh support Aug 22, 2025
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

cool, ty

one nit re feature activation

pending @DaniPopes

@github-project-automation github-project-automation bot moved this to In Progress in Alloy Aug 22, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Reviewed in Alloy Aug 22, 2025
@mattsse
Copy link
Member

mattsse commented Aug 22, 2025

Should we also implement Bytes

ah yes we should actually

@mattsse
Copy link
Member

mattsse commented Aug 22, 2025

@mablr to fix ci

32 | let mut out = Vec::new();
| ^^^ use of undeclared type Vec

we need to import alloc::vec::Vec manually

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

lgtm

@DaniPopes DaniPopes merged commit db374d9 into alloy-rs:main Aug 25, 2025
32 checks passed
@github-project-automation github-project-automation bot moved this from Reviewed to Done in Alloy Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Feature] Add borsh support

3 participants