cloudstate
cloudstate copied to clipboard
Protoc plugin to generate stub for specified language from gRPC descriptor
A suggestion for a plugin for protoc compiler which generates a stub for a given language support from a gRPC descriptor
This would be helpful also for languages where the generated protobuf artefacts are not fully complete; like the one for Go where service descriptors are not exported to user code. In this case, service names and methods are not available in a typesafe manner. Even the new protocolbuffer support for Go does not support that: ServiceName and Method names are private.
How would it be? I believe that there should be several plugins, one for each support language and maybe this is a hard job. It would be welcome of course, but I think a simpler way is to get tools like Cloudstate Community CLI or lbcs CLI to do that. Because I think that in this case it would just be compiling the proto files for each language with some code generators on top. Just thinking....
I think what his issue describes is a generic plugin to scaffold anything between a gRPC protobuf file and what the user has to implement just before he can start to write his business code. Even if hard to implement, it has to be done only once. The Cloudstate Community CLI would benefit of that too I think.
… I should add that personally I'm not that of a fan of scaffolding tools most of the time. But if it helps to get started, why not :)
I am thinking about the implementation and I don't see how a generic plugin could be in the protoc. But any wide entryway helps