-
Notifications
You must be signed in to change notification settings - Fork 735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mio build broken on Haiku, no kpoll/kqueue #1472
Comments
We don't really support Haiku. Is there any support for |
Nope. No support for either. We follow a pretty strict posix model |
actually it looks like mio 0.8.0 just works. The error above is on 0.6.23
soo.. I guess close issue waiting on folks to update :-) |
Scratch that. While mio 0.8.0 (and 0.7.9) builds on their own... building tokio 1.3.0 fails with similar errors from mio.
|
Building Mio without features basically builds everywhere because it's a non-implementation (see https://github.com/tokio-rs/mio/tree/58e589fddeac03453ffe60718c64e2a582c12275/src/sys/shell). But once you enable features we need actual OS support. So what system calls does Haiku have that we can use? Note that |
Weird.. to help me better determine if alternatives exist.. why are poll / select not good enough? select isn't polling and doesn't really waste CPU time? We have a pretty unique wait_for_objects call which might be a stand-in for epoll / kqueue: https://github.com/haiku/haiku/blob/master/headers/os/kernel/OS.h#L634 It's experimental however.. and documentation could be (a lot) better. libuv and libevent both have upstream Haiku support.. and they seem to work fine under our API. |
Just found a simple usage example of wait_for_events here: https://git.haiku-os.org/haiku/tree/src/servers/power/power_daemon.cpp#n118 |
The problem with If were to support |
Am I correct in thinking you still need to pass all the |
Hm. Yeah. You build the list of objects and operate on them (aka stateless) We have a GSoC session coming up.. one potential task is adding io_uring support to Haiku. This seemingly represents the "future" of fd monitoring on Linux and elsewhere. Any thoughts on the potential for mio to move to that model at some point in the future? I was linked a great FOSDEM video here: |
Ok. I went ahead and opened this ticket based on some discussions around this stuff: We generally only implement POSIX stuff, but it feels like we're lacking here. as for us targeting a io_uring API in the future, I feel like any discussions around io_uring would duplicate #923 so I won't bring them up 😁 Part of 16846 above would be offering a epoll/kqueue compatibility API leveraging a native io_uring implementation. With that said.. feel free to close this one if you deem it impractical for the moment. Feel free to point any future people complaining about mio not working under Haiku here 😆 A lot of crates eventually depend on mio though tokio.. I guess i'm going to have to avoid leveraging anything that uses tokio for a while. Thanks! |
Feel free to reopen or create a new issue once something like https://dev.haiku-os.org/ticket/16846 is possible on Haiku. |
This has been done by implementing a (subset of) kqueue, and it's now available on nightly builds, so this issue can be reopened. |
Does Mio test suite pass on Haiku with kqueue? |
I don't know, because I don't have a Rust setup on Haiku at the moment. @nielx or @kallisti5 may be more qualified to investigate. |
Just in case it's helpful in the future, I had prototyped running mio tests on a haiku vm in github actions on #1602 (comment) Commits and diff on GitHub: 1387b17...d4eef2f If the commits eventually disappear (I deleted my fork), here's the full ci.yml and diff: |
For anyone still watching this issue. Mio v1 will support Haiku using the |
There is a basic kqueue implementation, so it is worth investigating if it has all the features to switch over. I'll add it to my list. |
The text was updated successfully, but these errors were encountered: