libuv bindings for OCaml
56
stars
238
commits
OCaml
primary language
Jul 19, 2024
updated
Uwt provides OCaml bindings for libuv - on top of lwt.
Requests are translated to lwt-threads.
Callbacks that are called continually are most of the time not translated to the usual lwt semantic.
naming conventions mirror the conventions of libuv, so you can easily
consult the official libuv manual.
Only the differences are explained inside uwt.mli
Uwt is not compatible with lwt.unix. It's not a further
Lwt_engine in addition to select and libev. However, the
findlib package uwt.ext provides alternatives to the higher level
modules of lwt.unix with a nearly identic interface (Uwt_io,
Uwt_process, Uwt_log). You can also open the module Uwt_compat
(package uwt.compat) that provides aliases with module names as
found in lwt (e.g. Lwt_main instead of Uwt.Main). This is
necessary, if you want to use the camlp4 syntax extension of lwt.
Uwt is not thread safe. All uwt functions should be called from your main thread.
$ opam install uwt
# or for the latest development version
$ opam pin add uwt --dev-repo
Dependencies:
Build dependencies:
$ omake all
$ omake install
libuv will be compiled locally, if is not already installed on your system. You can also explicity enforce one option:
$ omake all BUILD_LIBUV=true
# or
$ omake all BUILD_LIBUV=false
OCaml
59.5%
C
37.8%
M4
1.5%
Shell
1.1%
libuv bindings for OCaml
56
stars
238
commits
OCaml
primary language
Jul 19, 2024
updated
Uwt provides OCaml bindings for libuv - on top of lwt.
Requests are translated to lwt-threads.
Callbacks that are called continually are most of the time not translated to the usual lwt semantic.
naming conventions mirror the conventions of libuv, so you can easily
consult the official libuv manual.
Only the differences are explained inside uwt.mli
Uwt is not compatible with lwt.unix. It's not a further
Lwt_engine in addition to select and libev. However, the
findlib package uwt.ext provides alternatives to the higher level
modules of lwt.unix with a nearly identic interface (Uwt_io,
Uwt_process, Uwt_log). You can also open the module Uwt_compat
(package uwt.compat) that provides aliases with module names as
found in lwt (e.g. Lwt_main instead of Uwt.Main). This is
necessary, if you want to use the camlp4 syntax extension of lwt.
Uwt is not thread safe. All uwt functions should be called from your main thread.
$ opam install uwt
# or for the latest development version
$ opam pin add uwt --dev-repo
Dependencies:
Build dependencies:
$ omake all
$ omake install
libuv will be compiled locally, if is not already installed on your system. You can also explicity enforce one option:
$ omake all BUILD_LIBUV=true
# or
$ omake all BUILD_LIBUV=false
OCaml
59.5%
C
37.8%
M4
1.5%
Shell
1.1%