What this package is like to depend on
Last release 1 months ago
16 Jul 2026
Ships fairly regularly
a new release about every 5 months
Nearly every release is documented
notes for 20 of 20 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
20 releases · first in 2019
2 releases in the last 12 months
see the full history below
Release timeline
20 releases · Oct 2019 to Jul 2026Releases
latest 20-
0.14.016 Jul 2026Release notes
Open source →New features:
- Allow building with libloading 0.9.
Fixes:
- Fix
CUT_BUFFER0toCUT_BUFFER7atom names. The generated code previously usedCUT_BUFFE_R0.
Breaking changes:
- Drop abstract unix socket support, following a change in libxcb.
- MSRV increased to Rust 1.68.
- Update to raw-window-handle 0.6.
Minor changes:
- Pin various dependencies in CI to keep the MSRV check working.
- Fix various new clippy and Rust warnings.
-
0.13.229 Aug 2025Release notes
Open source →New features:
- Update cursor icon file search path to follow a change in libxcb-cursor which in turn was changed to follow libXcursor.
- Get cursor theme name from
$XCURSOR_THEMEif set. - Added
XCBConnection::from_existing_connectionto allow wrapping anything that implementsAsRawXcbConection. Without this function, unsafe code was required from the user. - Added
raw-window-handlefeature which makesXCBConnectionimplementHasRawDisplayHandleandWindowWrapperimplementHasRawWindowHandle. - Use new
hints.mostly-unusedCargo feature. This might improve compilation speed with nightly compilers.
Fixes:
- Fix missing indentation in doc comments in generated code.
- Fix a minor X11 resource leak in cursor code.
- Gate tests behind the features they need so that
cargo test --no-default-featuresworks. This is now also tested in CI. - The
presentfeature depends ondri3to actually work, but this was not specified inCargo.toml.
Breaking changes:
- MSRV increased to Rust 1.64.
Minor changes:
- Various minor changes to fix new compiler and clippy warnings and improve readability.
- Use existing xcursor-rs crate for cursor and cursor theme file parsing instead of own code.
- Updated dependencies to rustix 1.0, gethostname 1.0. This required a MSRV increase to Rust 1.64.
- Pin various dependencies in CI to keep our MSRV check working.
-
0.13.101 May 2024Release notes
Open source →New features:
- Add an
xkbcommon-exampleto showcase use of x11rb together with the xkbcommon crate. - Update from xcb-proto 1.15.2 to 1.17.0. This brings support for PRESENT 1.4 and DRI3 1.4 and fixes some typos in the documentation.
Fixes:
- Macro hygiene:
atom_manager!macro now uses::stdwhen referring to std items.
Breaking changes:
- Optimise
atom_manager!implementation. This changes the contents of the generatedCookiestruct, but there should be no reasons to access these directly. - Remove some unreachable public API from x11rb-async's
StreamAdaptor.
Minor changes:
- Fix new compiler warnings and enable more lints.
- Update dependencies.
- Add an
-
0.13.009 Dec 2023Release notes
Open source →New features:
- A bitmask enum in the generates code has new methods
bits()for conversion to integer andremove()for removing certain bits. - Update our bundled xcb-proto version. This update brings new documentation and support for newer versions of the DPMS and Present extensions.
- Update
$DISPLAYparsing to match new behaviour in libxcb 1.16. - Some variant of
x11rb_protocol::parse_displayis now also available inno_stdmode. - Better error message if
$DISPLAYparsing fails. - Add
Image::into_owned()to get an Image instance with'static. - Change
Image::put()to convert the image to the X11 server's native representation before uploading. - Implement x11rb's
RequestConnectionfor&C,&mut C,Box<C>,Arc<C>,Rc<C>andCow<'_, C>whereC: RequestConnection.
Fixes:
- Fix broken link to x11rb in documentation of x11rb-async.
- Strip leading whitespace from documentation comments in code generator.
- Fix the
dl-libxcbfeature on OpenBSD. There is nolibxcb.so.2on this system and we can simply ask forlibxcb.soto be loaded. - x11rb-async always needed at least tracing 0.1.33, but incorrectly declared compatibility with all 0.1 versions.
Breaking changes:
- Indicate not present properties in x11rb's
WmClass,WmSizeHints, andWmHintshelpers by introducing anOptionin their return value. Previously, missing properties were reported as a parsing error. - Avoid a
Vecin some places in x11rb-protocol by using arrays instead. This affects the return value of a request'sserialize()function, but also some internal code. - Remove unused
read_exact()method in x11rb'sStreamtrait. - Replace use of nix with rustix and implement io-safety. This e.g. means
that some types no longer implement
PartialEqdue to rustix's behaviour. FD passing now usesstd::os::unix::io::OwnedFd. - MSRV was bumped from Rust 1.56 to 1.63 for rustix 0.38.
- Change some functions in
x11rb::rust_connection::stream::DefaultStreamto also return the address that a connection was established to. - Change wrapper types like
WindowWrappernot to require a reference to a connection, but to accept any connection type directly. Due to the new feature mentioned above, this allows to use these wrappers e.g. withArc<C>. - Types in x11rb-protocol now implement less commonly used traits like
PartialEq,Eq,PartialOrd,Ord, andHashonly if the newextra-traitsfeature is enabled. TheDebugimpl only produces the name of the type and not its contents in this case. This change improves compile times of the crate. - Parsing of requests with the
R::try_parse_requestfunction is now gated behind the newrequest-parsingfeature. This change improves compile times.
Minor changes:
- Update dependencies.
- Enable all features when building for docs.rs.
- Fix some lints in examples.
- Change some log calls from info to debug.
- Drop gethostname dependencies on
unixby using rustix instead. - Various changes to please clippy.
- Improve docs front pages.
- A bitmask enum in the generates code has new methods
-
0.12.027 May 2023Release notes
Open source →New features:
- There is a new crate x11rb-async that brings x11rb to the async ecosystem.
- Bitmask enumerations now also implement BitAnd, BitAndAssign and BitOrAssign and offers contains() and intersects() methods.
- Add (optional) support for the
as-raw-xcb-connectioncrate. - Implement Default for
x11rb_protocol::connection::Connection. - Optional support for the
tracingcrate. - New API to convert major + minor opcode of a request to human readable names.
Fixes:
- Improve error message when not all FDs could be sent.
- Use correct byte order on
Image::get()for big-endian servers. - Fix build for
XCBConnectionon architectures withoutAtomicU64.
Breaking changes:
- Various methods on
x11rb_protocol::protocol::xinput::EventForSendnow returnParseErrorinstead of unwrapping errors internally. - The generated names for some structs in
x11rb_protocol::protocol::xkbare now better. For example,SelectEventsAuxBitcase1is now calledSelectEventsAuxNewKeyboardNotify, which at least hints towards its meaning. Image::get()now also returns the visual ID from theGetImageReply.
Minor changes:
- Update dependencies.
- Get rid of some (infallible)
unwrap()s in generated code by moving this to a hand-written helper function. - The usual round of fixing new clippy warnings.
- Remove some unnecessary
unwrap()s in examples. - Use the polling crate in the xclock_utc example.
-
0.11.106 Jan 2023Release notes
Open source →Fixes:
- Fix connection breakage after sending 2^16 requests without a reply.
- Enable features on docs.rs to have better docs.
- Fix dl-libxcb feature on NetBSD not finding libxcb.so.
-
0.11.018 Nov 2022Release notes
Open source →New features:
- All extensions are available in no-std mode.
- Replies and events now implement
Serialize. - Support length expressions in structs in the protocol XML representation.
- Updated to xcb-proto 1.15.2 which brings support for the double buffering extension, dri3 1.3, xfixes 6.0, xinput 2.4, among other things.
x11rb::image::Imagenow implementsClone.
Fixes:
- Fixed a broken link in the documentation.
- The cairo-example now also works under KDE.
Breaking changes:
- Consider use of enums as masks when determining enum sizes and then use our
enum wrappers for mask fields. For example, all values of
xproto::ConfigWindowfit intou8, so previously this was the type used for representing this enumeration. However, it is used as a mask for thevalue_maskfield ofConfigureRequestEvent, which has 16 bits. Thus,ConfigWindowis now represented asu16and thevalue_maskfield ofConfigureRequestEventnow has typeConfigWindow. - Bump MSRV to 1.56 since
once_cellswitched to the 2021 edition.
Minor changes:
- Disable default features of nix crate.
- Deal with warnings from newest clippy.
- Improved unit test code coverage.
- Updated versions of dependencies.
- Switch to 2021 rust edition.
- Speed up
discard_reply()implementation in Rust for cases with many pending replies via a binary search.
-
0.10.115 Jun 2022 -
0.10.012 Jun 2022Release notes
Open source →New features:
- x11rb was split into two crates: x11rb-protocol contains code for working with the X11 protocol, but does not do any X11 I/O. The x11rb crate uses x11rb-protocol to implement an X11 client. This change allows to use x11rb-protocol in other crates without depending on a whole X11 client.
- Lots of new utilities to implement a X11 client in preparation of a possible future x11rb-async. Most of these previously already existed, but were not public. Now, x11rb-protocol makes them available.
- Add traits around requests that allow to send a request in a generic way.
- Implement more traits in the generated code, where possible:
Default,PartialOrd,Ord, andHash. x11rb-protocolcan be used inno_stdmode.- Optional serde support via deriving
serde::Serializeandserde::Deserialize. - Added support for X11 connections over abstract unix sockets.
- Increased the bus factor of the project by about 50%. Welcome @notgull!
Breaking changes:
- Bump MSRV to 1.46 due to the bitflags crate requiring this version. We depend on bitflags through the nix crate.
- Some minor API breakage due to the split into x11rb/x11rb-protocol. For
example,
CreateWindowRequest::send()was previously an associated function and was removed, because a similar feature is available via the new request traits. Also, the API for constructing a resource manager database was changed to remove the need for network I/O from its constructor. A convenience function for the old default behaviour is provided inx11rb.
Minor changes:
- Deal with warnings from newest clippy.
- Remove incorrect documentation for non-present fields from the generated code. This documentation was present because the field value is actually deduced from another field's value, for example the length of a vector.
- Add
#[must_use]to setter methods on*Auxstructs. - Updated to latest versions of dependencies.
- Received FDs now automatically get the
CLOEXECflag applied.
-
0.9.029 Aug 2021Release notes
Open source →New features:
- Add
protocol::xproto::ClientMessageEvent::new(). - Add human readable information about the request causing the error to
x11_utils::X11Error. - Add RAII wrappers for many resources. For example,
protocol::xproto::PixmapWrappercallsfree_pixmap()in itsDropimplementation. - Add
wrapper::GrabServerthat callsungrab_server()in itsDropimplementation.
Breaking changes:
- Fix some
clippy::upper_case_acronymswarnings:- Variants in
errors::ConnectError:IOErrorbecomesIoErrorZeroIDMaskbecomesZeroIdMaskFDPassingFailedbecomesFdPassingFailed
- Variants in
image::ImageOrder:LSBFirstbecomesLsbFirstMSBFirstbecomesMsbFirst
- Variants in
Minor changes:
x11rb::connect()now always returns aRustConnection. Previously, it returnedimpl Connectionand usedXCBConnectionif that was enabled.- Deal with warnings from newest clippy.
- Split up some large modules in the code generator.
- Update to latest version of crate dependencies that still support our MSRV.
- Bump our MSRV from Rust 1.40 to Rust 1.41.
- Add
-
0.8.110 Mar 2021Release notes
Open source →Minor changes:
- Update to latest version of crate dependencies.
- Fix some warnings from rustdoc.
- Deal with warnings from newest clippy.
- Try to clarify the documentation for X11 error handling.
-
0.8.009 Jan 2021Release notes
Open source →New features:
- Added a
resource_managerlibrary for querying the X11 resource database (Xrm). - Added a
from_configure_request(&ConfigureRequestEvent)function toxproto::ConfigureWindowAux.
Fixes:
- Rework
<enum>representation so that we can represent invalid values from the X11 server. This mainly fixes problems with XInput. - Add an
InvalidValuevariant to the representation of<switch>es. This variant is used when the server sends an invalid value for the<switch>discriminant. This fixes problems with XInput. - The
cursorcode now depends on the Xrm code for proper database support.
Breaking changes:
- Reword
<enum>representation: Instead of using a Rustenum, we now use a newtype around an integer. The named variants are provided as associated constants instead of enum variants. Due to Rust's naming rules, this means that e.g.xproto::EventMask::ButtonReleaseis now calledBUTTON_RELEASE. ParseErrorno longer implementsFrom<Infallible>.- Enumerations no longer implement conversion to
bool. - Removed unused
TryFrom<uXX>implementations for enumerations. - Removed
TryFrom<&[u8]>implementations from the generated code.
Minor changes:
- Removed some unnecessary
unwrap()s in the generated code. - Minor improvements to the code generator.
- Fixed some new clippy warnings.
- Binary operations on enumeration values now preserve the type instead of
mapping to integers (e.g.
ConfigWindow::WIDTH | 0now has typeConfigWindowinstead ofu8). - Add a
Debugimpl to enums that selects betweenUPPER_CASEandCamelCasebased on thealternate()flag. - Documentation improvements
- Added an internal helper trait
TryIntoUSizeto shorten the conversion from other numbers tousize. - Remove some no longer necessary
#![allow]s from the generated code.
- Added a
-
0.7.011 Oct 2020Release notes
Open source →New features:
- An image utility was added under
x11rb::image. This allows to do similar things as xcb's image library, e.g. endian conversion. A newdisplay_ppmexample showcases this new library a bit. - Add a
dl-libxcbfeature. With this feature, we do not link againstlibxcb.soforXCBConnection, but instead load the library at runtime vialibloading. - Request structs now have a
send()method. This allows for more readable request sending, without having to wonder "what was the fifth argument tocreate_windowagain?":
conn.create_window( screen.root_depth, win_id, screen.root, 0, 0, width, height, 0, WindowClass::InputOutput, 0, &win_aux, )?; CreateWindowRequest { depth: screen.root_depth, wid: win_id, parent: screen.root, x: 0, y: 0, width, height, border_width: 0, class: WindowClass::InputOutput, visual: 0, value_list: std::borrow::Cow::Borrowed(&win_aux), }.send(conn)?;Fixes:
- X11 errors are now represented by a single struct
x11rb::x11_utils::X11Error, because all errors are structurally equivalent. Only the error code differs. - More features are enabled for
docs.rs, hopefully making the docs complete. - Improve support for the record extension and add an example that shows how to use it.
Breaking changes:
- The minimum supported Rust version is now Rust 1.40 due to
#[non_exhaustive]. - The enumeration
x11rb::errors::ParseErrorwas split up into multiple values that now provide more information about which kind of error occurred. - Hide
x11rb::cursorbehind a feature gate. x11rb::protocol::Errorand all individual error structs were removed and replaced withx11rb::x11_utils::X11Error. This removes about 2.5k LOC of generated code.- Some enums are now marked as
#[non_exhaustive]. This includes all enums in the generated protocol code.
Minor changes:
x11rb::utils::RawFdContainernow always implementsDrop, even on non-cfg(unix)systems.- More items received doc comments. Only the generated code is not fully documented.
- Added a new
xtrace-examplethat runs a program and prints all of its X11 traffic to the console. - The
simple_window_managerexample was improved. It now has better support for titlebars: Only clicks inside the close button close the window and the remaining area allows to move a window. Also, the example now uses the X11 save set. - Update dependencies to
nix0.18 andwinapi-wsapoll0.1.1. - Minor internal changes to please newer clippy versions.
- An image utility was added under
-
0.6.019 Jun 2020Release notes
Open source →New features:
- The examples in this repository where extended:
- New
xclock_utcexample shows a clock. This is useful to see how to get a wakeup once per second. cairo-exampleuses a transparent background if a EWMH compliant composite manager is running.
- New
- The value of length fields are not part of the generated code. This release
adds accessors that allow recomputing their value. The motivation for this
change was
xproto::GetModiferMappingReply'skeycodes_per_modifierfield. - Added
structs for X11 requests and added infrastructure for parsing requests. Interested users should start with theprotocol::Requestenum. - Added a
protocol::Replyenum over all possible replies. - Added a
TryParseFdtrait for types that can be parsed from a combination of raw bytes and a list of file descriptors.
Fixes:
- Use nonblocking reads and writes for all interactions with the X11 server.
This fixes a theoretical deadlock with the X11 server that was never seen in
practice. Bindings for
poll()are now required. RustConnection::poll_for_event()previously only checked for pending queued event, but did not actually try to read new events from the X11 server.- There was a possible deadlock on low-level socket errors. A thread could end up waiting on a condition variable without ever getting woken up.
- The support for big requests was broken. Big requests are requests with more than 2^18 bytes. An incorrect length field was sent, cutting of the last four bytes of the request and causing them to be interpreted as a new request.
- The parsing codes for errors, events, and replies now return a correct
remainingslice.
Breaking changes:
- The whole code around
rust_connection's low level stream abstraction was redesigned. This now uses an abstraction over thepoll()function from libc (and requires similar support for all alternative transport implementations). - The
allow-unsafe-codefeature is no longer enabled by default. xkb_select_event'saffect_whichfield is now deduced based on other arguments and no longer has to be provided explicitly.- Changed return type of
VoidCookie::check()fromResult<Option<Error>, ConnectionError>toResult<(), ReplyError>. This still has the same possible errors as before, but they are represented differently. - Remove the
response_typefields from errors and replies, because they always have a fixed value (0for errors and1for replies).
Minor changes:
x11rb::rust_connection::Streamnow implements the traitsAsRawFd,IntoRawFd,AsRawSocket, andIntoRawSocket.x11rb::rust_connection::RustConnectionprovides immutable access to its low level stream via thestream()method.- Reworked CI integration. Tests are now also run on a big endian platform.
- Brought back the explanation of the generated code.
- Added a module-level doc comment to the generated code.
- Satisfy the newest version of our clippy overload for she has many complaints.
- The examples in this repository where extended:
-
0.5.010 May 2020Release notes
Open source →New features:
- The new
Connection::prefetch_maximum_request_bytes()API allows avoiding a round-trip when sending large requests. - Use enums to represent values in structs where it makes sense. Previously,
numeric types like
u8were used. This simplifies usage of much of the API. x11rb::extension_manager::ExtensionInformationcan now provide information about all the extensions that are known to be present.- New enums
x11rb::protocol::ErrorandEventallow representing any possible error or event in a parsed form. This allows e.g.matching on events for event handling. Also, these enums implementDebugand thus allow printing human-readable output on unexpected errors or events. This type also abstracts some of the complications of parsing events away from the library user. TheConnectiontrait was extended to be able to parse events/errors into these new types. - Some arguments to request functions became generic where it makes sense. For
example,
xproto::change_propertynow acceptsInto<ATOM>instead of justATOMas the name of the property to be changed. Thus, the predefined atoms likeAtomEnum::WM_NAMEcan be used directly without having to call.into()yourself. - Type names now follow Rust convention. For example,
xproto::WINDOWis now calledxproto::Window. - Added utilities for working
WM_CLASS,WM_SIZE_HINTS, andWM_SIZEproperties. - Implement
SerializeandTryParsefor tuples. - Increased the bus factor of the project by about factor 2. Welcome @eduardosm!
- Replace the Python code generator with a generator written in Rust.
- Added an API for reading a cursor from the active cursor theme. The
simple_windowexample was extended to use the new API. RustConnectionnow supports FD passing.
Fixes:
- A possible hang when a
QueryExtensionrequest failed was fixed. - Improve FFI definitions used by
XCBConnection. - Fix some shadowing issues in the generated code. For example, GLX has its own
Pixmaptype, but also wants to refer to xproto'sPixmapin some places. - Alignment pads were incorrectly ignored in
<switch>cases with only one visible field. This affected only the xinput and xkb extensions. - Properly reconstruct sequence numbers in
XCBConnectionafter 2^32 requests. The old code only ever provided 32 bits of the sequence number. - Fix compiler error on empty
atom_manager!invocations. - Request serialisation panics if some overflow occurs instead of producing incorrect data.
Breaking changes:
- The
vendor-xcb-protofeature flag is no longer available. The included xcb-proto is now always used. - The
xprotofeature flag was removed. It did not do anything. - The module
x11rb::generatedwas renamed tox11rb::protocol. - Better snake names are generated, e.g.
XIQueryVersionbecomesxi_query_versioninstead ofxiquery_version. - Opcodes for events using the generic event extension are now
u16. x11rb::connection::Connection::compute_length_field()was moved out of theConnectiontrait and tox11rb::connection::compute_length_field().- Use enums to represent values in structs where it makes sense.
- Enums that collide with types now have the suffix
Enumattached to their name. For example,xproto::Atomis now calledxproto::AtomEnum. - Return a simplified struct from
RequestConnection::extension_informationinstead of the fullQueryExtensionReply. - Rename the
ExtensionInformationstruct toExtensionManager. GenericEvent,GenericError, and the relatedEventtrait were removed.- Changes to
RequestConnectionandConnectionthat affect implementations of these traits. For example, methodsparse_eventandparse_errorwere added. - The
Connectiontrait now returns parsed event and errors of typex11rb::protocol::EventandError, respectively. The old API providing bytes is retained with alternative names. For example, there iswait_for_event()andwait_for_raw_event(). - Some functions in the
Connectiontrait now return X11 errors in theirOkvariant via a newReplyOrErrorenum. This should only affect implementations of theConnectiontrait. - Added some wrapper structs in some parts of
xinput. This is related to<switch>handling. - Swap the order of elements in
EventAndSeqNumber. - Remove some length fields from the public API that can be deduced from the length of other values.
- Some
Serializeimplementations were removed from types that depend on value from the surrounding context. RustConnectionnow supports FD passing. This removes the API for constructing aRustConnectionfrom a pair ofReadandWrite, but alternatives for the new API exists.RawFdContainerprovides no methods when it is not available. This turns some run-time errors into compile-time errors.
Minor changes:
- No code is generated anymore at build times. Instead, the generated code is shipped with the crate.
- The code generator sorts the list of XML files before generating output, ensuring a stable output independent of file system order.
- Some parsing code was simplified, saving 5903 (according to git's
--statoutput). - The vendored copy of xcb-proto was updated.
- Some fixes to the internal XCB FFI mock that is used for testing.
- The code generator and
xcb-protoare excluded from releases, shrinking the size of the crate a bit. XCBConnectionnow usesxcb_poll_for_reply64()instead ofxcb_poll_for_reply(). This means that libxcb 1.12 or newer is required.- The
simple_windowexample sets more properties. - Some readability and general improvements to the generated code.
- Implement conversion to
boolfor enums with just two values. - Added a special fast path for parsing lists of
u8. - Some refactoring to the I/O in
RustConnection. - Implement
From<ParseError>forReplyOrIdError. - Added an example showing how to use x11rb with cairo.
RawFdContainerno longer depends on theallow-unsafe-codefeature.RawFdContainerno longer panics when thecloseon drop fails.- New API
close()andtry_clone()is available onRawFdContainer. - Use type aliases for
<eventcopy>and<errorcopy>definitions. This means that theDebugimplementation may now print the 'wrong' type name, but shortens the generated code by more than 4000 lines.
- The new
-
0.4.112 Mar 2020Release notes
Open source →Fixes for XKB:
- Fix encoding of
xkb::SelectEvents. More details can be found in commit 83ff34452bf9. - Make fields of
switchstructs public so that e.g.GetMapMapbecomes usable.
Minor changes:
- Only depend on libc if the
allow-unsafe-codefeature is enabled. - Reexport error/event type in
rust_connection/xcb_ffimodules. - Move
multithread_testfromexamples/totests/.
- Fix encoding of
-
0.4.008 Mar 2020Release notes
Open source →New features:
- Add support for the XKB and XInput extensions to the code generator.
- x11rb now supports the same X11 extension that libxcb supports!
- The
GetKbdByName,GetGeometry,SetGeometry,ListComponentsare not correctly described by xcb-proto and thus still unsupported.
- Add an
allow-unsafe-codeandforbid(unsafe-code)without this feature. - Add
x11rb::connect()for establishing a connection to an X11 server. Depending on theallow-unsafe-codefeature, this either returns aRustConnectionor anXCBConnection. - Make
RustConnectionfully functional and thread-safe.- The only known missing features are FD-passing and XDM-AUTHORIZATION-1 support.
- This required a new dependency on the
gethostnamecrate.
- Add an
atom_manager!macro.- This macro allows to generate a struct that queries many atoms with a single round-trip.
- Add a
Serializetrait for producing wire bytes from an in-memory representation.- This trait can be implemented for all types and slices, simplifying the generated Rust code.
- Serialization is possible into a returned
Vec<u8>or by appending into a provided&mut Vec<u8>.
- Add helpers to
GetPropertyReplythat simplify its interpretation.- This adds
value8(&self),value16(&self)andvalue32(&self)methods that check for the correct format and return an iterator over the value.
- This adds
- Add a function to create an
XCBConnectionfrom a raw pointer. - Add
Connection::wait_for_event_with_sequence()andConnection::poll_for_event_with_sequence()that allow to get an event together with its full sequence number. - Add API for prefetching extension information.
- General improvements to the documentation.
- Emit correct
cargo:rerun-if-changed=lines frombuild.rs. - Make
x11rb::utils::CSlicesafer. - Use
rustfmt. - Add AppVeyor for Windows CI.
Breaking changes:
- Add feature gates for individual X11 extensions. The
all-extensionsfeature enables all X11 extensions. - Introduce
Results in some places that previously ignored errors or paniced. - Split up
ConnectionErrorinto two enums, one for errors that can occur while establishing a connection and another for errors on an already-established connection. - Prefix request function names in the
ConnectionExttraits with the extension name. This is necessary since several extensions contain different versions of the same request.- As an example,
x11rb::generated::shm::ConnectionExt::create_pixmapis now calledshm_create_pixmapto avoid a collision withx11rb::generated::xproto::ConnectionExt::create_pixmap. The plain functionshm::create_pixmapkept its name.
- As an example,
- Rename
ConnectionErrorOrX11ErrortoReplyError. - Remove
x11rb::utils::Buffertype. Instead, there is an associated typeConnection::Buf. This isVec<u8>forRustConnectionandCSliceforXCBConnection. - Remove
LazyAtom.
Changes to the generated code and the code generator.
- Implement
Frominstead ofIntoin the generated code. - Use better type names in the generated code, e.g.
WINDOWinstead ofu32. - Simplify and fix some warnings in the generated code without changing visible behaviour.
- Change internal storage of unions in the generated code from
Vecto fixed length arrays. - Fix xproto's
SetModifierMappingrequest. The code generator was ignoring an expression that required a multiplication with a constant value to get the length of a list. - Fix xproto's
SetupAuthenticateand res'sClientIdValueserialization. An expression in the XMl was ignored. - Specify enum discriminators where possible.
- Implement
TryFrom<uX>for enums.
Many thanks to @dalcde and @eduardosm for their valuable contributions.
- Add support for the XKB and XInput extensions to the code generator.
-
0.3.004 Jan 2020Release notes
Open source →- Split out some types from
x11rb::connectioninto their own modules. - Split
xcb_ffiandrust_connectioninto multiple modules. - Use type aliases like
WINDOWin the generated code instead ofu32. - Fix a type confusion in the SYNC extension's generated code where
i64was used instead of the correctInt64. - Update the vendored copy of xcb-proto so that
booltypes can be properly handled in the generated code. - Add constants to extensions containing the extension version number.
- Add a
LazyAtomtype that sends anInternAtomrequest and asynchronously waits for the answer. - Implement
Clone,PartialEq, andEqfor various types. - Add various "zero constants" that XCB defines in
xcb.h. - Allow
Connectionimplementations to be unsized (?Sized). - Split the
Connectiontrait intoRequestConnectionandConnection. - Run Clippy on the code and deal with its findings.
- Return a copy instead of a reference from
extension_information(). - Allow the creation of union instances via
From. - Add module-level functions for each request instead of having them only
available in traits. This simplifies handling of some name collisions, e.g.
around
query_versionbeing defined by basically all extensions. - Add support for XGE events to the code generator and
XCBConnection. - Mock libxcb for unit tests.
- Implement parsing from borrowed data where possible, i.e.
TryFrom<&Buffer>,From<&GenericEvent>, andFrom<&GenericError>. - Implement
From<GenericError>forGenericEvent. - Clean up some of the internals of
XCBConnectionandRustConnection. - Add API for checked/unchecked requests and improve documentation on X11 error handling.
- Simplify and document the code generator.
- Use examples as integration tests on Travis.
- Fix padding with non-unitary alignment.
- Implement implicit padding at end of requests.
- Fix padding length calculation in conjunction with
<pad align="4"/>. - Add
sequence_number()andraw_reply()functions to all cookies. - Add a
Makefilethat allows to evaluate changes to the code generator. Usage ismake ref, then changing the code generator, thenmake cmpto get a diff with the changes. - Add support for some of the XML used for the XInput extension.
- Implement
TryParseonly for structs. - Deny more Rust lints and fix resulting errors.
- Add support for sending and receiving file descriptors (FD passing).
- Add more examples.
- Add a sync() function behaving like
xcb_aux_sync()/XSync(). - Test rustc 1.37.0 on Travis as minimum supported Rust version.
- Split out some types from
-
0.2.002 Nov 2019Release notes
Open source →- The
only_if_existsparameter ofInternAtomhas typebool. - Make
SendEventusable. Events now implementInto<[u8; 32]>. - Add fields like
sequenceto the generates structs for replies, errors, and events. - Implement
From<GenericEvent>for events andFrom<GenericError>for errors. - Add support for big requests.
- Derive
Eqfor the error enums. - Return
Resultfromsend_request_with/without_reply(). - Make
XCBConnectionSend and Sync. - Add a getter for
xcb_connection_t*toXCBConnection. - Implement
AsRawFdforXCBConnection. - Move functions for sending requests into an extension trait.
- Generate documentation from the
<doc>tags in the XML. - Add a copy of xcb-proto 1.13 to this crate. This copy is used if the
vendor-xcb-protofeature is enabled, which it is by default. Thus, this crate becomes easier to compile. - Change calls to
xcb_send_request64()so that the indices -1 and -2 are valid. - Add
poll_for_event()toConnection. - Improve the code generator so that all extensions except xinput and xkb are supported.
- Improve the examples.
- New examples:
xeyes,hypnomoire,tutorial
- New examples:
- Add hand-written wrappers to simplify use of
ChangeProperty. - Improve documentation
- Fix length calculations for lists with expressions (
ChangeProperty,ChangeKeyboardMapping,GetPropertyReply, ...) - Fix padding calculation for lists with elements with sizes different from zero.
- Added a tutorial as
examples/tutorial.rs.
- The
-
0.1.011 Oct 2019