google-api-proto
google-api-proto copied to clipboard
Enabling gRPC server codegen
Hi, I was wondering if it is possible to enable the gRPC server codegen. It is disabled in the code generation (see here).
Is there a specific reason that it is disabled?
If enabled, it may be useful for creating mock servers in a testing scenario.
@hiltontj Hi, I believe that most use cases can be satisfied with client-only code generation.
Enabling server-side code generation will increase the amount of code generated and compile time.
Alternatives to server-side mock might be to use existing implementations in other languages, docker images, or emulators provided by gcloud tools.
Hey @mechiru, understood. Thanks for the quick response and suggestions.
I've spent some time reading through the code here and see that this wouldn't necessarily be a trivial change, e.g., as a feature flag. I agree, generating the server code by default may not be the best idea after all.
Would it be possible to generate at least the use google_api_proto::google::api::expr::conformance::v1alpha1 servers?
It can be in a different crate, as long as it's compatible with the google-api-protos. This would be to support the cel-spec tests