Skip to content

feat: extend serde allocator implementation - #719

Open
alejandro-vaz wants to merge 2 commits into
servo:v2from
alejandro-vaz:serde-expansion
Open

alejandro-vaz wants to merge 2 commits into
servo:v2from
alejandro-vaz:serde-expansion

Conversation

@alejandro-vaz

@alejandro-vaz alejandro-vaz commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

this PR extends serde's serialize to apply to smallvecs in any allocator

we may be able to do the same with deserialize, by serializing the allocator as well, but that may not be the intended behavior

closes #709

@alejandro-vaz alejandro-vaz self-assigned this Oct 4, 2026
@alejandro-vaz
alejandro-vaz marked this pull request as ready for review October 4, 2026 08:43
@alejandro-vaz
alejandro-vaz requested a review from jdm October 4, 2026 08:43
@alejandro-vaz

Copy link
Copy Markdown
Collaborator Author

it is not possible to serialize the allocator and then deserialize it and nothing guarantees it would still be valid

@bolshoytoster

bolshoytoster commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Don't worry about Deserialize - serde doesn't handle custom allocators at all for its Vec implementations.

@alejandro-vaz

Copy link
Copy Markdown
Collaborator Author

yeah ik ik, plus it's extremely cumbersome

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.

allocator expansion for serde.rs

2 participants