Skip to content

feat: added borsh deserialize and tests - #530

Merged
jdm merged 2 commits into
servo:v2from
alejandro-vaz:finborsh
Sep 2, 2026
Merged

feat: added borsh deserialize and tests#530
jdm merged 2 commits into
servo:v2from
alejandro-vaz:finborsh

Conversation

@alejandro-vaz

@alejandro-vaz alejandro-vaz commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

this PR finishes off the borsh feature adding:

  • BorshDeserialize
  • testing

it also changes the wire representation to serialize an u64 instead of an usize for cross-platform compatibility

when targets that are not 64-bits try to deserialize a sequence containing more than usize::MAX elements, it returns an error. in 64-bits targets this should be optimized away to a no-op since u64 always converts to usize

closes #485

closes #522

closes #291

Comment thread tests/borsh.rs Outdated
@jdm
jdm added this pull request to the merge queue Sep 2, 2026
Merged via the queue into servo:v2 with commit 9ebd5ea Sep 2, 2026
5 checks passed
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.

add tests for borsh serialization on tests/borsh.rs implement BorshDeserialize for SmallVec Add a borsh feature to get Borsh traits implemented

2 participants