#x11 #xcb #api #interop #connection #facilitate #libxcb

no-std as-raw-xcb-connection

Trait to facilitate interoperatibility with libxcb C API

3 releases (stable)

1.0.1 Dec 17, 2023
1.0.0 Jan 7, 2023
0.1.0 Jan 2, 2023

#154 in Unix APIs

Download history 18814/week @ 2024-01-02 20659/week @ 2024-01-09 24195/week @ 2024-01-16 26931/week @ 2024-01-23 27461/week @ 2024-01-30 30607/week @ 2024-02-06 34201/week @ 2024-02-13 36502/week @ 2024-02-20 36698/week @ 2024-02-27 33959/week @ 2024-03-05 34499/week @ 2024-03-12 37463/week @ 2024-03-19 40687/week @ 2024-03-26 35785/week @ 2024-04-02 35006/week @ 2024-04-09 32966/week @ 2024-04-16

150,774 downloads per month
Used in 167 crates (5 directly)

MIT/Apache

7KB
56 lines

This crate provides the trait AsRawXcbConnection.

The idea is to facilitate interoperability in the ecosystem. The problem is as follows:

There are multiple crates that wrap the libxcb C API to provide a "connection" type. There are also multiple crates wrapping various C libraries that need a pointer to xcb_connection_t to work correctly.

Without this library, API consumers must pick one Rust library that wraps libxcb and only accept this type in its public API. Worse, one must also pick a specific version of the crate and would then only work with that type.

The trait AsRawXcbConnection breaks this connection. All libraries that wrap libxcb can implement this trait. This makes one independent from specific versions of API consumer crates.

No runtime deps

Features