Allow compiling for Unix native with no X11 linkage
- Dominant language
- Rust
- Stars
- 30.6k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 72
Description
**Is your feature request related to a problem? Please describe.**
I'm using egui to build for an embedded linux platform with no x11 support. Trying to get egui to link with no x11 inclusion using glow was extremely complicated, so I switched to wgpu. The remaining x11 inclusion came from the egui-winit "clipboard" feature and wasn't optional / I couldn't fix that in my own Cargo.toml.
Building for wgpu with egui-winit "clipboard" and "links" features removed successfully yields an x11-free binary.
**Describe the solution you'd like**
I already forked the repo to test stuff out, but submitting an issue as per the PR requirements doc. Adding a feature to eframe that itself just includes ["egui-winit/clipboard", "egui-winit/links"], and removing those features from the non-wasm dependencies section fixes this problem. It's not a perfect solution because enabling that feature on a non-native platform will probably fail to compile, but Rust's support for per-feature-per-platform dependencies is not robust and I wasn't able to figure out how to make that work.
Contributor guide
Research direction
Start with the eframe dependency configuration in Cargo.toml and trace how the egui-winit "clipboard" and "links" features are enabled for native targets. Compare the configuration against the issue's wgpu build experiment and verify that Unix-native compilation can omit X11 while the requested features remain usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 34/100