2 ms·
Here is protobuf parser I wrote for a client w/ ragel/c++. We needed way to parse the proto specification to generate our own code, since the google's own C++ r
by Cloudef 4y ago
Here is protobuf parser I wrote for a client w/ ragel/c++. We needed way to parse the proto specification to generate our own code, since the google's own C++ runtimes were way too huge for our use case especially with reflection. The nanopb in addition to the code generation w/ this parser was used in the end to keep the binary bloat in check.
https://gist.github.com/Cloudef/7a69eba054f61ee63d6ee59262e1b695 https://gist.github.com/Cloudef/7a69eba054f61ee63d6ee59262e1...
I also did this benchmark for cap'n'proto, flatbuffers, protobuf and raw structs. This is already years old so it might not be accurate anymore, but what surprised me most was how different flatbuffers was compared to raw struct, as the design sounds like it should be merely extension to what is essentially raw struct + making sure the data can be portably encoded and decoded.
https://cloudef.pw/protobug.png https://cloudef.pw/protobug.png