A Protobuf compiler plugin for Odin. It should be used with the runtime odin-protobuf library.
Put this plugin's binary next to a Protobuf Compiler (protoc) or in the PATH. Then use --odin_out
argument to generate Odin files.
For this example proto file:
message SearchRequest {
string query = 1;
int32 page_number = 2;
int32 results_per_page = 3;
}
This plugin will generate this Odin output:
SearchRequest :: struct {
query : string `id:"1" type:"9"`,
page_number : i32 `id:"2" type:"5"`,
results_per_page : i32 `id:"3" type:"5"`,
}