TODO
All examples share the same schema:
syntax = "proto3";
package example;
message Person {
string name = 1;
int32 age = 2;
string email = 3;
}Encoding a message to the binary wire format:
const person = example.Person{
.name = "Alice",
.age = 30,
.email = "alice@example.com",
};
const encoded = try protobuf.to_binary(allocator, person);
defer allocator.free(encoded);
std.debug.print("encoded ({d} bytes): {x}\n", .{ encoded.len, encoded });