Skip to content

feat: added borsh deserialize and tests - #530

Open
alejandro-vaz wants to merge 1 commit into
servo:v2from
alejandro-vaz:finborsh
Open

feat: added borsh deserialize and tests#530
alejandro-vaz wants to merge 1 commit 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

@alejandro-vaz
alejandro-vaz requested a review from jdm August 31, 2026 15:22
@alejandro-vaz alejandro-vaz self-assigned this Aug 31, 2026
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

1 participant