Open xeniarose opened 2 months ago
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 https://github.com/rust-lang/rust/issues/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?