Added support for vita target#1721
Conversation
Thomasdezeeuw
left a comment
There was a problem hiding this comment.
Hello again :)
With these changes mio compiles and (mostly) works with
armv7-sony-vita-newlibeabihftarget with--cfg mio_unsupported_force_poll_poll --cfg mio_unsupported_force_waker_piperust flags.
armv7-sony-vita-newlibeabihfis a Tier 3 target with working std via newlib.The target has no
epollorkqueue, onlypollandselectand async pipes, so cfg flags are required for compilation. This is not an issue for devs using the target, since most if not all who work with it usecargo-vitatool for building, and it automatically adds these flags toRUSTFLAGS.
To be clear --cfg mio_unsupported_force_poll_poll/mio_unsupported_force_waker_pipe is not meant to be used for normal development. It's only to overwrite the preferred polling/waking implementation.
Since vita doesn't have epoll or kqueue the preferred polling implementation is the poll(2) one. It's a bit messy at the moment with cfg are round this place (also see #1715), but once merged no develop should have to use a RUSTFLAG to run Mio on vita.
* Like `espidf` it has no process API and thus no `CLOEXEC` * `sockaddr_in` is mildly different on this target, and has an additional field * no `ioctl`, so `set_nonblocking` for vita follows illumos * async pipes are implemented with `pipe2` syscall for this target
👍 LGTM.
Can we add a cargo check to the CI here as well? I think the socket2 one can be copied.
|
Hi!
I can, but it won't compile without these cfg flags right now, and I'm not sure they should be added to ci checks. |
They were actually added to test the
If you can change them in this pr that would be great. I wanted to this myself in #1715, but I without rustup support for Solaris isn't quite a pain in the but to test. |
|
Updated PR - added Although for tokio we still need to set Maybe this implementation detail can somehow be exposed? (not in the scope of this PR of course) |
👍
This is technically Tokio depending on unspecific behaviour (see tokio-rs/tokio#5866 (comment)). Let's try resolve that in tokio-rs/tokio#5866. |
Thomasdezeeuw
left a comment
There was a problem hiding this comment.
LGTM, can't test, but the CI seems happy.
|
Thanks @nikarh |
|
Hey, sorry to bother you @Thomasdezeeuw, would it be possible to make a release with these changes? Thanks! |
With these changes mio compiles and (mostly) works with
armv7-sony-vita-newlibeabihftarget with--cfg mio_unsupported_force_poll_poll --cfg mio_unsupported_force_waker_piperust flags.armv7-sony-vita-newlibeabihfis a Tier 3 target with working std via newlib.The target has no
epollorkqueue, onlypollandselectand async pipes, so cfg flags are required for compilation.This is not an issue for devs using the target, since most if not all who work with it use
cargo-vitatool for building, and it automatically adds these flags toRUSTFLAGS.espidfit has no process API and thus noCLOEXECsockaddr_inis mildly different on this target, and has an additional fieldioctl, soset_nonblockingfor vita follows illumospipe2call for this target