README.md
1# X11 rust bindings
2
3[![GitHub Actions Status](https://github.com/psychon/x11rb/workflows/CI/badge.svg)](https://github.com/psychon/x11rb/actions)
4[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/950g0t6i8hfc9dup/branch/master?svg=true)](https://ci.appveyor.com/project/psychon/x11rb)
5[![Crate](https://img.shields.io/crates/v/x11rb.svg)](https://crates.io/crates/x11rb)
6[![API](https://docs.rs/x11rb/badge.svg)](https://docs.rs/x11rb)
7![Minimum rustc version](https://img.shields.io/badge/rustc-1.40+-lightgray.svg)
8[![License](https://img.shields.io/crates/l/x11rb.svg)](https://github.com/psychon/x11rb#license)
9
10Feel free to open issues for any problems or questions you might have.
11A comparison with some other Rust X11 libraries is available in an [extra
12document](doc/comparison.md).
13
14
15## Building
16
17This crate uses a code generator that is implemented in Rust. A copy of the
18generated code is included, so you do not need to run the generator unless
19you have modified the definitions or the generator itself.
20
21The code generator uses the X11 XML description from `xcb-proto`. A copy of
22xcb-proto that comes with the source code is used.
23
24The interaction with libxcb via `XCBConnection` requires at least libxcb 1.12.
25
26
27## Does this support async/await
28
29No. If you have so many X11 connections that this would matter, you are doing
30something wrong. Also, it encourages people to write high-latency code instead
31of sending multiple requests and only afterwards wait for the replies.
32
33
34## Crate features
35
36Most X11 extensions are feature-gated. For example, to use the shared memory
37extansion, the `shm` feature has to be enabled.
38
39The `all-extensions` feature just enables all X11 extensions.
40
41Additionally, the `allow-unsafe-code` feature enables `XCBConnection`. This uses
42`libxcb` internally and allows sharing the underlying `xcb_connection_t` pointer
43with other code.
44
45The `cursor` feature enables X11 cursor support via the `cursor` module. This
46module helps with loading cursors from the current cursor theme.
47
48
49## Current state
50
51The full X11 protocol is supported by this library. All extensions that are
52available in `xcb-proto` can be used and even [FD
53passing](examples/shared_memory.rs) with the server is supported.
54
55The changelog is available in a [separate file](doc/changelog.md).
56
57
58## License
59
60Licensed under either of
61
62 * Apache License, Version 2.0
63 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
64 * MIT license
65 ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
66
67at your option.
68
69The subdirectory xcb-proto-1.14-1-g2b3559c contains a vendored copy of the
70package of the same name. It is covered by the MIT license. See
71[xcb-proto-1.14-1-g2b3559c/COPYING](xcb-proto-1.14-1-g2b3559c/COPYING) for details.
72
73## Contribution
74
75Unless you explicitly state otherwise, any contribution intentionally submitted
76for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
77dual licensed as above, without any additional terms or conditions.
78