I am trying to play with a simple binary based protocol over tcp. I want to send a simple struct to my client when i connect but am having trouble figuring out how i can print the struct to []u8.
const MyStruct = struct {
a: u8,
b: u16,
c: u32,
};
var my_struct = MyStruct{ .a = 1, .b = 2, .c = 3 };
_ = my_struct;
var buffer: [@sizeOf(MyStruct)]u8 = undefined;
_ = buffer;
std.mem.copy(???)