▲ 1 r/rust_gamedev
Macros for Flatbuffers
https://github.com/AndrewOfC/rust_flatbuffer_macros
Flatbuffers are a data exchange protocol with rust support. These macros simplify the creation of a typical use case where you have something like:
table AddRequest {
addend_a: int32 ;
addend_b: int32 ;
}
table MultiplyRequest {
multiplicand: int32 ;
mutiplier: int32 ;
}
union Payload {
AddRequest,
MultiplyRequest,
}
table Message {
payload: Payload ; // Note fieldname must be same as field name in snake case
}
u/AndrewOfC — 2 days ago