nano IO event loop
Find a file
Simon Cruanes 10700a3962
Some checks failed
github pages / Deploy doc (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / format (push) Has been cancelled
readme
2025-09-29 11:20:43 -04:00
.github/workflows require OCaml 4.14 2025-05-08 11:44:58 -04:00
examples update example 2025-05-07 09:52:36 -04:00
src fix: handle POLLERR and POLLNVAL in posix backend 2025-05-30 15:25:18 -04:00
tests annotate tests with their package 2025-05-08 13:19:55 -04:00
.gitignore initial commit 2024-10-17 22:54:49 -04:00
.ocamlformat ocamlformat 2025-04-30 16:12:44 -04:00
CHANGES.md prepare for 0.1 2025-05-09 12:42:39 -04:00
dune-project lower bound on iomux 2025-05-08 15:05:38 -04:00
echo.sh wip: example 2024-12-09 22:32:09 -05:00
Makefile initial commit 2024-10-17 22:54:49 -04:00
nanoev-picos.opam prepare for 0.1 2025-05-09 12:42:39 -04:00
nanoev-posix.opam prepare for 0.1 2025-05-09 12:42:39 -04:00
nanoev.opam prepare for 0.1 2025-05-09 12:42:39 -04:00
nanoev_tiny_httpd.opam prepare for 0.1 2025-05-09 12:42:39 -04:00
README.md readme 2025-09-29 11:20:43 -04:00

nanoev

NOTE (2025-09-29): I ended up not using this. Instead I reuse Lwt and Lwt_engine. I recommend not using this as there are some timer-related bugs.

A minimalistic but modular abstraction for IO event loops.

The goal of this library is to provide a uniform abstraction over multiple system event loops, in a way that plays well with Picos.

Usage

Very basic usage would look like this:

module EV = Nanoev_picos


let () =
  (* use a backend, eg. select *)
  let ev = Nanoev_unix.create () in

  (* install the backend *)
  Nanoev_picos.setup_bg_thread ev;

  (* setup a picos scheduler and use EV.read, EV.write, etc. *)
  

Backends

  • select
  • poll/ppoll
  • epoll
  • kqueue
  • uring