Machine readable protocol specification #205
metux
started this conversation in
2 RFCs of the Core Team
Replies: 2 comments 7 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
I've thinking about it, and im wondering about one thing. If a reply contains a list element then how should it be allocated and added to the reply? using xorg_list (include/list.h)? maybe we need to create a new dynamic array type? I guess the marshaller itself could have an add_xx_item, which adds an item to the list for the field that is an array |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello folks,
I've long been thinking about an machine readable protocol specification - at least for generating headers from that.
xcb-proto already does it to some extend, but it's really complicated XML stuff, incomplete in many cases (fixing it would cause xcb API to break miserably) and focused on common clients, not server.
Since it's a long and tedious process to transition to complete auto-generation of protocol marshalling code (or at least request/response structures, etc), I'm thinking about having our own definitions within the xserver tree and extending it step-by-step. For the time being that would be explicitly Xserver-internal, and the schema isn't fixed yet - until we can be sure that it's complete enough that we don't need any incompatible schema changes anymore.
As the basic language, I'd prefer YAML over XML (IMHO easier to understand/parse - for both men and machine).
An interesting question also is which language the code generator shall be written in. Golang ? Python ?
(personally I'm somewhat leaning to golang, because - surprisingly - golang seems to be more/easier portable across platforms for within the build process than python -- note: it's just compile-time, not runtime)
What's your thoughts on that ?
Beta Was this translation helpful? Give feedback.
All reactions