-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add SerializeBits
derive macro
#74
Comments
from what I can see, this would first require adding are we looking for |
@pizzart if you're up to it, you can try building this. We can skip over |
I have a rough draft of this at https://github.com/widberg/bilge using danlehmann/arbitrary-int#38. It doesn't play nice with |
@widberg nicely done, feel free to open a draft PR :) |
I was waiting for the arbitrary-int pr to go through so I wouldn't have my git repo as a dependency but I'll open a draft pr so it's easier to find and update it later. |
The arbitrary-int PR looks like it was merged and released as part of v1.2.7, is there more work that needs to be done to revive this feature? This would be very nice to have, specifically the serialize side of things. |
I switched the Cargo.toml dependency from my arbitrary-int git repo to v1.2.7 on crates.io and switched the PR from draft to open. My tests are passing but please test my repo and let me know if there are any problems. |
I've been testing this today and it's working well so far for my usecase -- which is just using SerializeBits, not the deserialize side. Features I'm currently exercising are:
Important features I haven't yet looked at so can't comment on status:
|
The normal Serialize macro serializes the struct into a struct with the field "value":
Feature request: add a derive macro implementing Serialize on the struct and its fields behind a
serde
feature flag, something like:so that it serializes to:
The text was updated successfully, but these errors were encountered: