rust-windowing / rust-windowing/winit

Xlib must die

Open
#3,198 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DS - x11
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:

Discussion questions:

  • I want to be able to replace x11-dl with tiny-xlib, is this possible?
  • Do we want to add a feature to remove Xlib entirely 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.