Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protoc #36

Closed
unicomp21 opened this issue Sep 7, 2022 · 2 comments
Closed

protoc #36

unicomp21 opened this issue Sep 7, 2022 · 2 comments

Comments

@unicomp21
Copy link

can we enable discussions on this repo?

how do I generate a .proto file from protopuf? or vice versa? suggestions?

@PragmaTwice
Copy link
Owner

PragmaTwice commented Sep 7, 2022

Hi @unicomp21.

can we enable discussions on this repo?

Sure! It is enabled now.

how do I generate a .proto file from protopuf? or vice versa? suggestions?

It may be complicated to translate c++ type definitions of protopuf messages to .proto message definitions,
since c++ type system is complex and you may need libClang to parse and analyze semantics of C++ code.

But translating .proto message definitions to protopuf c++ types is easier,
since the proto language is descriptive and simple, and you can write a protoc plug-in or use some parser generaters to parse .proto and then generate some corresponding c++ code.

I actually planned to write a translator to convert from .proto to protopuf c++ type definitions (see #15), but I don't have time to move forward with this work at the moment.

Ideas and suggestions are always welcome!

@unicomp21
Copy link
Author

Makes sense, thanks @PragmaTwice !

This is a beautiful header lib, wish protobuf had been implemented this way in the first place, lol.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants