Instead of maintaining two identical files, I suggest writing a build rule that just constructs the "lite" version from the regular version. You could use a make rule like:
my_lite.proto: my.proto cp my.proto my_lite.proto echo "option optimize_for = LITE_RUNTIME;" >> my_lite.proto This way the files cannot get out-of-sync. See also comment 11 in this thread: http://code.google.com/p/protobuf/issues/detail?id=187#c11 There I provide a protoc plugin which converts inputs to lite mode. It's a more complicated approach but less hacky. On Tue, Oct 26, 2010 at 2:56 PM, Alsmom2005 <gundanu...@gmail.com> wrote: > Hi all, > > Is it ok if the serialization is made using libprotobuf library and > the deserialization (on the other end) is made using code built with > libprotobuf-lite library ? That meaning 2 .proto files (the only > difference bw those two file is that one contains 'option optimize_for > = LITE_RUNTIME') . > > Thank you in advance! > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to proto...@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.