hecatia-elegua / bilge

Use bitsized types as if they were a feature of rust.
Apache License 2.0
173 stars 18 forks source link

Add `SerializeBits`/`DeserializeBits` derive macros #84

Closed widberg closed 6 months ago

widberg commented 1 year ago

Draft pr for issue #74

widberg commented 7 months ago

Let me know if those tests look any better or if you have more cases you want me to add. I'll work on cleaning up the logic you pointed out before this gets merged. ime internal deserialize code is usually pretty complicated just because of how serde requires it to be implemented; if there is a better way I'd be happy to do it like that instead.

hecatia-elegua commented 7 months ago

(running CI to run tests, feel free to clean up still)

widberg commented 7 months ago

I took a stab at cleaning up those ugly tuple types and couldn't come up with anything that didn't look uglier to me :(. That being said I wouldn't be offended if you or someone else took a hacksaw to my stuff. I don't have anything else to offer for this PR.

hecatia-elegua commented 6 months ago

We got it :) Now I'll need to figure out how to handle the nightly stuff.

Thank you again.