X Rust Bindings (a.k.a. XRB) is an implementation of the X Window System protocol version 11, more commonly known as X11, in Rust. It provides types and data structures for X11, as well as serialization and deserialization for them.
Hey! Why not check out XRB's documentation? It contains a lot of information about the project, and has many examples and explanations.
XRB is not, however, an X library. It does not offer functionality for connecting to the X server, sending or receiving messages, nor an opinionated API. The idea is that those functionalities are implemented on top of XRB with an API wrapper, such as X.RS. XRB provides a foundation for API wrappers so that they can focus on their APIs, not on implementing the X protocol.
Contributions are welcome and encouraged for XRB! Here's a list of resources that you may find useful:
- X Window System protocol version 11
– The protocol itself.
- 1. Protocol Formats – An overview of the format of messages in the X11 protocol.
- Appendix B. Protocol Encoding – The encoding of X11 types and data structures as bytes. Probably the most directly important section for the development of XRB.
- Glossary – A glossary of terms used in X, helpful to understand what's going on and especially to write documentation.
- The Rust Programming Language – A great resource to learn Rust in general.
- Rust API Guidelines – Recommendations for the design and presentation of Rust APIs.
- Mozilla License Headers – Copy-and-pasteable headers the MPL-v2.0 license. This header must be added to every source file in XRB, preferably as a comment at the beginning of the file.