protobuf-d

Denis Feklushkin feklushkin.denis at gmail.com
Wed Sep 30 02:48:52 UTC 2020


On Tuesday, 29 September 2020 at 15:38:43 UTC, Robert Aron wrote:
> Hello!
>
> I am currently working on "D Language Client Libraries for 
> Google APIs" project[0][1].
> The first step was to familiarize myself with protobuf and to 
> generate client library for cloud/vision using python plugin 
> with protoc.
> Today I generated the same library with protobuf-d[2]. When I 
> tried to translate this example[3] from python to D, I noticed 
> that some pieces of code are missing from the D generated 
> library, for example the ImageAnnotatorClient class(or struct) 
> (I could not found it anywhere in the generated code).
>
> Here is the command that I used to generate the client library:
>
> protoc path/to/cloud/vision/proto/files
> --proto_path=path/to/common/api/protos --proto-path=.
> --plugin=path/to/protobuf-d --d_opt=message-as-struct
> --d_out=path/to/output/files
>
> Is that ok? Does it work as it should?
> Also I read here[4] that the C++ generator defines some default 
> methods.

ImageAnnotatorClient isn't described in any of *.proto file in 
https://github.com/googleapis/googleapis repository. (I found 
only ImageAnnotator)

So, maybe here is messed up proto3 and gRPC or something like it?


More information about the Digitalmars-d-learn mailing list