rust-windowing / rust-windowing/winit
Xlib must die
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Xlib is the legacy strategy for interacting with the X server. It has since been replaced by libxcb, which is lighter and has fewer soundless holes. x11rb wraps around libxcb and reimplements the protocol parsing logic in safe Rust, further reducing the number of places where unsound logic can occur.
List of places in winit where Xlib still lurks:
- Event handling and IME (fixed in https://github.com/rust-windowing/winit/pull/3122)
- Cursor handling code (could use https://github.com/esposm03/xcursor-rs instead)
SelectXkbEvents(cc https://github.com/rust-windowing/winit/pull/3087)- Keymap querying
Discussion questions:
- I want to be able to replace
x11-dlwithtiny-xlib, is this possible? - Do we want to add a feature to remove
Xlibentirely and just use XCB? - Going further, do we want to add a feature to remove these two external libraries from our X backend altogether and just use
x11rb's pure-Rust backend?- Is this also available for Wayland?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Xlib locations listed in the issue, especially src/platform_impl/linux/x11/util/keys.rs, cursor handling, and SelectXkbEvents; event handling and IME are already marked fixed. Before changing code, resolve the discussion about x11-dl, tiny-xlib, XCB, and x11rb; done requires an agreed migration scope implemented across the affected X11 backend.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, operating-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100