package uwt

  1. Overview
  2. Docs
libuv bindings

Install

Dune Dependency

Authors

Maintainers

Sources

uwt-0.2.4.tar.gz
sha256=7dc4f5eb06803e4ce0ad14b26accfe7f156ebe8ac3a5544ec62b82c97a432313
md5=26b99812f4a40a3d17c2633dcfd9b609

Description

uwt provides OCaml bindings for libuv. The main loop of libuv is integrated into lwt, the light-weight cooperative threads library.

Tags

clib:libuv

Published: 10 Feb 2018

README

Uwt

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.

Installation

Quick install guide

$ opam install uwt
# or for the latest development version
$ opam pin add uwt --dev-repo

Manual install

Dependencies:

  • OCaml 4.02.1 or later

  • lwt 2.6.0 or later

  • libuv 1.8 or later

Build dependencies:

  • pkg-config / pkgconf

  • findlib

  • omake

  • cppo

  • ppx_deriving (test only)

  • ppx_import (test only)

  • ounit (test only)

  • autoconf (repo pinning only)

$ 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

Dependencies (11)

  1. lwt >= "2.6.0" & < "4.0"
  2. result
  3. omake build
  4. cppo build & >= "1.3"
  5. ocamlfind build
  6. conf-pkg-config build
  7. base-bytes
  8. base-threads
  9. base-bigarray
  10. base-unix
  11. ocaml >= "4.02.1"

Dev Dependencies (3)

  1. ppx_import with-test & >= "1.0" & < "2.0"
  2. ppx_deriving with-test & >= "2.0"
  3. ounit with-test & >= "2.0"

Used by (2)

  1. distributed-uwt
  2. vpnkit >= "0.1.1"

Conflicts

None

OCaml

Innovation. Community. Security.