Closed
Description
Hello,
I'd like to be able to have one proto file that can be optimized for lite runtime or not based on the command line used to generate the code.
use case:
- proto file shared between a java server and a c# client.
- The server doesn't want a lite runtime as it needs reflection
- The client would use the lite runtime as it's resource restricted and doesn't need the reflection apis.
Right now, there are a few options to achieve what i need:
- copy the proto file and stamp in the 'optimize_for' setting that you need and then run protoc on the copy
- run the proto file through a preprocessor before passing to protoc.
My goal would be to not have to edit the proto files in anyway between client and server.
All this is assuming that the serialized formats of the lite runtime vs non-lite runtime are compatible (binary & json).
If there's another way to achieve my goal, please let me know.
Thanks.
Activity