Hi Petteri,
Thanks for your quick response and handed support.
However, I've decided currently to go with protozero, as I think it's more suitable for my case currently.
As a feedback why, here's some reasons got me away from nanopb:
- Buffers should be statically provided beforehand (even though malloc option is available).
- To my understanding, nanopb encodes 2x times the same object, and if I want to calculate the needed buffer size in prior, I'd need another one.
- The perceived complexity of utilizing the library is high to me.
- I'll prefer C++ always, but the complexity reaches the C++ wrapper too, and given the requirement (of getting a view of string/bytes at decoding), I really don't know whether I need to take a similar approach answered there (and what goes beyound that?), or it'll be solved directly within the wrapper.
- My use-case is simple, and it wont change as far as I can see, thus, the build serializers and parsers took me no more than a day.
Therefore I've postponed the adoption of protobuf-schema-aware library to the future.
Hope nanopb the best,
Hamza Hajeir