18 releases (breaking)

0.13.1 May 1, 2024
0.13.0 Dec 9, 2023
0.12.0 May 27, 2023
0.11.1 Jan 6, 2023
0.2.0 Nov 2, 2019

#2 in Graphics APIs

Download history 115418/week @ 2024-08-16 131776/week @ 2024-08-23 130060/week @ 2024-08-30 125483/week @ 2024-09-06 117386/week @ 2024-09-13 130876/week @ 2024-09-20 130961/week @ 2024-09-27 133582/week @ 2024-10-04 133872/week @ 2024-10-11 142661/week @ 2024-10-18 139703/week @ 2024-10-25 144719/week @ 2024-11-01 140959/week @ 2024-11-08 132621/week @ 2024-11-15 120320/week @ 2024-11-22 118788/week @ 2024-11-29

537,261 downloads per month
Used in 1,086 crates (60 directly)

MIT/Apache

6.5MB
149K SLoC

X11 rust bindings

GitHub Actions Status Crate API Minimum rustc version License

Feel free to open issues for any problems or questions you might have. A comparison with some other Rust X11 libraries is available in an extra document.

Building

This crate uses a code generator that is implemented in Rust. A copy of the generated code is included, so you do not need to run the generator unless you have modified the definitions or the generator itself.

The code generator uses the X11 XML description from xcb-proto. A copy of xcb-proto that comes with the source code is used.

The interaction with libxcb via XCBConnection requires at least libxcb 1.12.

Crate features

Most X11 extensions are feature-gated. For example, to use the shared memory extension, the shm feature has to be enabled.

The all-extensions feature just enables all X11 extensions.

Additionally, the allow-unsafe-code feature enables XCBConnection. This uses libxcb internally and allows sharing the underlying xcb_connection_t pointer with other code.

The cursor feature enables X11 cursor support via the cursor module. This module helps with loading cursors from the current cursor theme.

Current state

The full X11 protocol is supported by this library. All extensions that are available in xcb-proto can be used and even FD passing with the server is supported.

The changelog is available in a separate file.

License

Licensed under either of

at your option.

The subdirectory xcb-proto-1.17.0 contains a vendored copy of the package of the same name. It is covered by the MIT license. See xcb-proto-1.17.0/COPYING for details.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~1.5–9.5MB
~110K SLoC