Re:The Protobuf Language Specification
by overboard2 on Monday September 12, 2022 @04:13PM
(#32816237)
Have you thought of creating your own version of the protobuf language, sort of like GNU C? You could have an optional flag to enable it, which would allow you to create your own official specification.
Re:The Protobuf Language Specification
by rad_gruchalski on Tuesday September 13, 2022 @10:06AM
(#32824461)
There is a specification: https://developers.google.com/protocol-buffers/docs/referenc....
It took two minutes to find but now I wonder, is there something wrong with it�
Re:The Protobuf Language Specification
by jeffparsons on Friday September 16, 2022 @07:05PM
(#32873170)
I've used the Google docs as a reference to build software that parses '.proto' files and then generate code based on what I found. The docs are... incomplete, ambiguous, and in some places directly contradict the behaviour of protoc. So they're okay as a guide for learning how to write '.proto' files by hand, but a specification they are not.
It's been several years, so I can't point you to specifics. But if you look at open source projects that parse '.proto' files and do anything interesting with the result, you'll probably find lots of comments to the effect of "docs say X, but we are doing Y because that's what protoc does".
But we do hope that eventually the official definition of the language will be a proper specification, not a particular implementation. (And maybe this document could be the start of that shift.)
So while there are multiple implementations (Buf, Square/Wire, probably others), the protoc implementation is canon.