02/10/2023, 12:52 AM
I'm trying to write a wrapper around the x11 protocol and I was wondering if theres some better way of interacting with it than manually writing the bytes. I was thinking maybe i could have kotlinx serialization to take some object and convert to bytes, then I could take bytes and convert it into an object. There's the problem though that x11 proto likes to have variable length packets, and sometimes unused bytes which Im not sure how and if thats possible with serialization. Here is a link to the encoding specification


02/10/2023, 1:19 AM
I don't think this is a good fit for kotlinx.serialization. all the X protocol definitions are defined externally, not inside Kotlin.
IMO you should have everything generated off of xcb-proto