rust-windowing / rust-windowing/winit
On Unix, expose a way to register file descriptors into the polling loop
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
Under the hood both Unix backends use calloop, which supports registering arbitrary file descriptors through the polling crate. However, winit usually isn't the only thing running in the GUI system; there's also zbus, accesskit and other things. It would be nice if you could register these systems into winit and poll them without needing to spawn another thread.
Two potential options here:
- Expose a way to register file descriptors in
calloop, then receive events as normal through thewinitevent loop. Then expose a higher-level I/O mechanism in another crate. - Port from
callooptoasync-io. This would take a lot more work and be more controversial, but it would allow for seamless integration withzbus.
cc https://github.com/AccessKit/accesskit/pull/337#issuecomment-2002494310, @mwcampbell
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 reading the two Unix backends and their calloop event-loop integration, then compare calloop's polling support with the proposed async-io approach. The issue requires choosing between these designs before implementation; done would mean a supported way to integrate external file descriptors and receive their events through winit without another thread.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop-dev, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100