jamesmunns / postcard

A no_std + serde compatible message library for Rust
Apache License 2.0
930 stars 89 forks source link

Feature request: configure `fixint` at the container level #95

Open pwfff opened 1 year ago

pwfff commented 1 year ago

Maybe this is possible already and my weak Rust is the only thing stopping me, but I'm wanting to basically always use the fixint option, and the with attribute is going to be half my codebase at this point :<

If the other side of my service wasn't a completely different language I'd prefer varint, but for now I'd rather opt out altogether if possible.

pwfff commented 1 year ago

I gave it a shot :) https://github.com/jamesmunns/postcard/pull/96

stblair-crystalpeak commented 1 year ago

This would be a great feature, I'm also in a scenario where I need to apply fixint to every single int type for a particular struct that I'm serializing. It would be so much easier if you could either apply the with at the struct level, or just at the container level. I hope they get to this, or accept your feature PR :)

armandas commented 6 months ago

Need this exact feature :(