Wire format header does not describe number of file descriptors per message
The Wayland wire format header provides a field for the message length in bytes, but does not provide a field for the number of file descriptors that is consumed.
Because clients must fully parse the incoming protocol to match the file descriptors that are provided with corresponding messages, an inventive solution in libwayland-client is needed to ensure that clients can parse even messages sent to objects that have been deleted by the client, but not yet acknowledged as deleted by the server. If the wire format would describe the number of file descriptors used per message, then libwayland-client could more easily close all file descriptors corresponding to unknown messages.
(I'm adding this issue because it's something to keep in mind in case the wire format ever has some other reason for a change; one may as well solve two problems at once then. It's also an issue for anyone writing their own code to manipulate the Wayland protocol. As noted in the comments of "The Wayland Zombie Apocalypse is Near", wire format and core semantic changes should definitely not be made without consensus or in a way that can break existing code.)
It's possible to update the wire format in a (mostly) backwards compatible fashion. Since practically no messages use >4096 bytes, and no interfaces have >1024 methods, the second word of the wire format has bits to spare to count a small number of fds per message. One approach, albeit not recommended.