Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement serde::Serialize and serde::Deserialize for integers and floats #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xdoardo
Copy link

@xdoardo xdoardo commented Oct 9, 2024

As per title: an initial contribution towards a broader implementation of serde's traits. As of now, the implementations are feature gated.

Let me know if the general structure is good enough, and then we can figure out what's the best way to test the implementations.

@djkoloski
Copy link
Collaborator

We should probably be calling serde's separate serialize_* methods on Serializer to retain the underlying types in the data model. For example, serializing a u64_le should call serialize_u64 so the backend can decide how best to represent it.

Copy link
Collaborator

@djkoloski djkoloski left a comment

Choose a reason for hiding this comment

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

Clarifying: serde doesn't have a notion of endianness in its data model, so these should serialize as regular integers and floats.

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.

2 participants