I am using protocol buffer in rust. tokio/prost is a popular one. As I add a simple message like below my binary file size get 7kb bigger. And this is really big amount because of my low flash size(280kb). Any advice to optimize the prost code or the messages.
message MetricLogic{ uint32 id = 1;
bool is_incremented =2;
bool is_diff =3;
LogicType logic_type = 4;
uint32 metric_id =5;
ValueConditionGroup statement = 6;
uint32 factor = 7;
uint32 offset = 8;
}
I need about 30 messages generally but I think I need to merge some to more generag message but I have no idea that what exactly this amount of code comes. The C library was really lighter.