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.
Wasn't the proto-gen-d supposed to do the same?

Thanks!

[0] https://github.com/dlang/projects/issues/66
[1] https://forum.dlang.org/post/eaefvlbgikujonfjj...@forum.dlang.org
[2] https://github.com/dcarp/protobuf-d
[3] https://gapic-generator-python.readthedocs.io/en/stable/getting-started/docker.html#verifying-the-library [4] https://developers.google.com/protocol-buffers/docs/reference/cpp-generated#message

  • protobuf-d Robert Aron via Digitalmars-d-learn

Reply via email to