Registry / other / x11
library2.21.0rscratesunverified

X11 library bindings for Rust

# Cargo.toml [dependencies] x11 = "2.21.0"
INSTALL
IMPORT
SIG · X11
X
x11
otherrustv2.21.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

XOpenDisplay
use x11::xlib::XOpenDisplay;

Opens a connection to the X11 display server.

use x11::xlib::XOpenDisplay; unsafe { let display = XOpenDisplay(std::ptr::null()); if display.is_null() { eprintln!("Cannot open display"); } }
Debug
Known issues
gotchaRequires X11 development libraries installed on the system
fix
Install libx11-dev (Linux) or equivalent; on macOS/Windows this will not work
affects: *
Upgrade
Version history
2.21.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
28
Resources
x11 — cargo add x11 · libregistry