Question: Does this crate work with tokio?
Uzaaft opened this issue · 3 comments
Sorry if this is not a fitting place to ask questions like these.
I'm working on a WM, and i've been using this crate, which is working amazingly well, but it forces me to use winit, which I'd rather not have so that I can reduce my build times in CI. Is it possible to use this crate with tokio? And if so, do you guys have a Minimal working example for that?
If you only care about x11/Linux you may get away with not using it.
For Windows and macOS you need winit or similar crates though just because of how the OS apis work. There may be smaller, more targeted crates that only handle the bare minimum idk, or you could even pull out the relevant event loop & window messaging code from winit, but that sounds like too much pain to me 😅
p.s. tokio is not a replacement for winit in the sense that it could handle the os-interfacing event loop stuff (like the window messaging).
Edit: i hope i just didn't say straight up wrong stuff, this isn't exactly my area of expertise.
Fabian is correct, if you only ever need x11
support, you can use this crate, otherwise you needed an event loop on macOS/Windows.
Got it, thanks for the answer. :) There's no downsides currently to sticking with winit besides the reduction of dependencies, so I'll just stick with it for now. Appreciate the answers!