I work on implementing a binary protocol for a service. This protocol is
based on messages - structs that support integer numbers, variable-length
arrays and other structs, i.e. something we could implement in Julia as:
immutable Message1
version::Int16
length::Int32
payload::Array{Message2,1}
end
Creating a serializer for any such message is trivial, but I have about 50
of them and would like to automate it, i.e. I'd like a generic way to write
an immutable structure to a stream. So far the closest candidate is
StrPack.jl <https://strpackjl.readthedocs.io/en/latest/>, but it doesn't
support variable-length array, which is the must for me.
Do we have something for this or I should come up with my own
function/macro?