protopuf icon indicating copy to clipboard operation
protopuf copied to clipboard

[Infra] Translator: from Protocol Buffers language (proto3) to protopuf C++ code snippets

Open PragmaTwice opened this issue 4 years ago • 3 comments

PragmaTwice avatar Feb 28 '21 04:02 PragmaTwice

In the meantime, I'm realizing another simple option could be json with typescript interfaces, to describe a schema? This can then be recursively walked to generate a .proto and the respective protopuf declarations? In other words, the json file becomes the "source of truth" from which everything else is generated.

unicomp21 avatar Sep 09 '22 09:09 unicomp21

Sure, but probably the biggest advantage of translating from protocol buffers language to protopuf c++ type definitions is that many existing .proto files can be reused, which would be lost in translating from json.

PragmaTwice avatar Sep 09 '22 13:09 PragmaTwice

Absolutely, I was simply suggesting a workaround in the meantime.

unicomp21 avatar Sep 09 '22 14:09 unicomp21