Uwt provides OCaml bindings for libuv. The main loop of libuv is
integrated into lwt
, the
light-weight cooperative threads ("promise") library.
Uwt is not compatible with lwt.unix
. It's not a further
Lwt_engine
in addition to select
and libev
. It only uses the
system independent parts of lwt that can also be used with
JavaScript
or
ocamljava
.
Uwt_base
contains type definitions and functions that are shared by
Uwt
and Uv_fs_sync
. Uwt_base
is included in Uwt
, you
usually don't use it directly.
Uwt_base | Lwt independent core |
Uwt_bytes | Byte arrays |
The main part of this library. The naming conventions mirror the
conventions of libuv, so you can easily consult the official
libuv manual
.
Selected parts of the manual are now included inside the mli files
(credits to the
authors
), the libuv manual is however more up-to-date.
Uwt | Uwt main module |
lwt.unix
also provides higher level modules. They have been ported
to uwt
and have a very similar interface:
Uwt_throttle | Rate limiters |
Uwt_timeout | Timeouts |
Uwt_io | Buffered byte channels |
Uwt_process | Process management |
The counterpart of Lwt_preemptive
is in a separate findlib subpackage
uwt.preemptive
, because it introduces the dependency on the standard
threads library.
Uwt_preemptive | This module allows to mix preemptive threads with |
Uwt_compat
provides aliases with module names as found in
lwt.unix
, e.g. Lwt_io
instead of Uwt_io
or Lwt_main
instead of
Uwt.Main
). This is necessary, if you want to use the
camlp4 syntax
extension
of lwt. And it makes it easier to test or use existing
code with uwt
instead of lwt.unix
.
Uwt_compat | Lwt_unix compat module |
Uv_fs_sync
(findlib name: uwt.sync
) can be used for synchronous
filesystem operations. This might be useful, if you target Windows:
Uv_fs_sync | Synchronous filesystem operations |
Uwt is licensed under a MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Libuv is also distributed under the MIT License.