0

Google protobufs have multi language support including languages like C/C++, python, ruby, Go, etc.

protoc --cpp_out o1 --java_out o2 --python_out o3

Does nanopb hold multi-language support or is it primarily targeting usage from C?

jxramos
  • 7,356
  • 6
  • 57
  • 105

1 Answers1

0

Found the answer in the home page of the documentation which I missed.

Nanopb is a plain-C implementation of Google's Protocol Buffers data format. It is targeted at 32 bit microcontrollers, but is also fit for other embedded systems with tight (<10 kB ROM, <1 kB RAM) memory constraints.

https://jpa.kapsi.fi/nanopb/


Background

I'm trying to wrangle google protobuf instances and convert them to nanopb types in a C++ python binding

jxramos
  • 7,356
  • 6
  • 57
  • 105
  • Note that all protobuf libraries use the same binary format. So easiest solution is probably to serialize your messages before passing them to C. – jpa Feb 27 '21 at 05:18