Coder Social home page Coder Social logo

Comments (4)

kchibisov avatar kchibisov commented on May 28, 2024

This would take a lot more work and be more controversial, but it would allow for seamless integration with zbus.

zbus is a really poor argument to all of that, since it's the most complicated and bizarre library I've ever used. But generally allowing inserting sources into winit's event loop is a desired solution.

I'd also say that winit should be the one controlling the loop on all the platforms in one way or another, thus it should allow registration of sources on all of them. Otherwise it should be left to a specific backend.

from winit.

mwcampbell avatar mwcampbell commented on May 28, 2024

Unfortunately for what we want to do here, zbus doesn't let you get a file descriptor for the connection and drive the I/O yourself; it can only use async-io or tokio. But I've come to appreciate the calloop style of event handling and async I/O in Rust, where the application controls the event loop and maintains sole ownership of mutable state. So ideally I'd like a pure-Rust D-Bus implementation that integrates easily with calloop, without necessarily being coupled to it, just as wayland-rs isn't tightly coupled to calloop. But that would be too much of a distraction from my current work. Anyway, I think winit's support for FD event sources should be designed such that it would work well with such a D-Bus implementation.

from winit.

kchibisov avatar kchibisov commented on May 28, 2024

The current state of winit allows you to plug its fd into your own event loop and poll it on demand, however I'd also like to have some kind of executor eventually, so you can plug things into winit itself.

from winit.

mwcampbell avatar mwcampbell commented on May 28, 2024

Yes, plugging things into winit is what I'd prefer, because that way AccessKit could handle D-Bus events on the main thread, possibly with access to the same mutable application state as the regular winit event handler, without requiring the application to replace its event loop.

from winit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.