You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm interested in implementing support for serial ports on eio, but after spending a lot of time trying to get this started and exploring the eio codebase it seems like the current state of eio makes this unreasonably difficult
for example:
given a path, it would be nice to be able to manually call openat on linux and posix platforms with the O_NOCTTY flag. however, at least with Eio_linux the platform doesn't make the Dir_fd resource handler public so there is basically no way to call Eio_linux.Low_level.openat from an arbitrary Path.t -- the only workaround i found was to convert the Path into its native string and then use that, but i don't really like that approach
assuming we are somehow able to manually call openat, obtain the fd, execute the setup ioctls, it would then be nice to be able to wrap this in a Flow, but there doesn't seem to be a way to do that either
what's the recommended approach here? would a hypothetical tty/serial subsystem be better served being part of eio directly? or could eio just expose a bit more of the platform-specific internals to outside libraries?
The text was updated successfully, but these errors were encountered:
It's not very obvious, but you can use import_socket_stream to wrap an FD as a flow.
Exposing Eio_linux.get_dir_fd_opt seems reasonable to me. Possibly we should always pass O_NOCTTY when opening things (there's a Rust issue for this at rust-lang/rust#24307 but it got closed with no clear conclusion).
i'm interested in implementing support for serial ports on eio, but after spending a lot of time trying to get this started and exploring the eio codebase it seems like the current state of eio makes this unreasonably difficult
for example:
O_NOCTTY
flag. however, at least withEio_linux
the platform doesn't make theDir_fd
resource handler public so there is basically no way to callEio_linux.Low_level.openat
from an arbitraryPath.t
-- the only workaround i found was to convert the Path into its native string and then use that, but i don't really like that approachopenat
, obtain the fd, execute the setup ioctls, it would then be nice to be able to wrap this in a Flow, but there doesn't seem to be a way to do that eitherwhat's the recommended approach here? would a hypothetical tty/serial subsystem be better served being part of eio directly? or could eio just expose a bit more of the platform-specific internals to outside libraries?
The text was updated successfully, but these errors were encountered: