Eio 1.4 is now released and available from opam-repository.
About Eio
Eio provides an effects-based direct-style IO stack for OCaml 5. For example, you can use Eio to read and write files, make network connections, or perform CPU-intensive calculations, running multiple operations at the same time. It aims to be easy to use, secure, well documented, and fast. A generic cross-platform API is implemented by optimised backends for different platforms.
Eio implements similar functionality to Lwt or Async, but using effects rather than monadic concurrency. Eio and Lwt libraries can be mixed freely using lwt_eio, allowing programs to be converted to Eio incrementally.
For a tutorial, see the Eio README.
Highlights of the 1.4 release
-
Eio.Net supports socket options (both the standard
Unixones and many more, e.g.TCP_KEEPINTVL). -
Eio.Path provides more file-system operations (
chmod,chown,read_dir_entries,with_dir_entries). These all use the modern*atsystem calls andRESOLVE_BENEATHto make it easy to restrict path operations to a subtree (seePath.with_subtree). -
Eio_unix.Pty adds pseudoterminal support (for writing terminal emulators, SSH servers, etc).
The Eio_linux backend (which uses io_uring rather than traditional POSIX system calls) now also supports statx, fallocate and fdatasync.
Important bug-fixes include a work-around for macOS poll failing for certain devices, Path.load working on 0-length-but-not-empty files (as found under /proc on Linux), better blocking behaviour with FIFOs (named pipes), and a fix for Windows using 100% CPU in some cases if an FD was used for both reading and writing.
Note: Eio.Net.getaddrinfo previously returned [] if there was an error (following Unix.getaddrinfo), but now raises an exception with details of the actual error.
For a full list of changes, see the release notes.