ExtUnix OCaml library

Build Status OCaml-CI Build Status

A collection of thin bindings to various low-level system API.

Our motto: "Be to Unix, what extlib is to stdlib"

Homepage: https://ygrek.org/p/ocaml-extunix/

Why?

Most of the system API don't deserve fully fledged library.

The ExtUnix project aims to collect these in one place. Read the "ExtUnix integration requirements" to know what kind of system API we can integrate.

Installation

Dependencies :

Build and install:

make
make install

Alternatively use the underlying Dune build system directly (plain ocaml, no sh and make needed):

dune build @install

Usage example:

$ ocaml
# #use "topfind";;
# #require "extunix";;
# module U = ExtUnix.Specific;;
# U.ttyname Unix.stdout;;
- : string = "/dev/pts/8"

Run unit tests:

make test

Guidelines

For OCaml programming style, we follow Unix module:

Portability:

Build infrastructure:

ExtUnix integration requirements

We can integrate into ExtUnix:

We should avoid system calls that are complex and would deserve a library on their own. For example, a family of more than 10 functions and datatypes should deserve its own library. If an external library already exists and works, like for inotify system call, we also won't consider it for integration.

Regarding Win32 portability: If there is a sane default to create a portable equivalent of the function on Windows, we can consider it. And we will mark it as such in the documentation.

Checklist for adding new bindings

Checklist for release

Development

Many people contribute to extunix. Please submit your patches and/or feature requests to the project bugtracker at https://github.com/ygrek/extunix/issues.

The current maintainer is reachable at mailto:ygrek@autistici.org.