Communications and networking
Other protocols
json-static
[05-Feb-2008, version
0.9.6,
Beta]


Json-static is a companion for the json-wheel library.
By reading a type definition, the preprocessor inserts code that converts between OCaml types (lists, arrays, tuples, objects, polymorphic variants, ...) and untyped JSON data. Those type definitions are written in a syntax which is very close to regular OCaml type definitions.
json-wheel
[04-Dec-2006, version
1.0.0,
Stable]

json-wheel is an OCaml implementation of the JSON data interchange format,
which can be considered as a lightweight alternative to XML.
Netamqp
[14-Apr-2011, version
1.0,
Stable]


This library implements an AMQP client for accessing a message broker. The supported protocol version is 0-9-1, and successful tests have been run against RabbitMQ.
The library is designed as an extension to Ocamlnet.
Webdav client library
[08-Feb-2011, version
1.0,
Stable]

This library implements the client side of the WebDAV protocol (RFC 4918). The file locking part of WebDAV is omitted, though.
The library uses Ocamlnet's [netclient] library for client-side HTTP, and extends it by providing the required access methods for WebDAV. Additionally, there is also an implementation for Ocamlnet's Netfs.stream_fs abstraction modelling a simple file system.
General purpose libraries
Sequence
[21-Feb-2013, version
0.3.1,
Beta]
Simple sequence abstract datatype, intented to transfer a finite number of elements from one data structure to another. Some transformations on sequences, like filter, map, take, drop and append can be performed before the sequence is iterated/folded on.
Strings manipulation
Easy-format
[10-Jul-2008, version
0.9.0,
Beta]

A small library (a module in fact) that is meant
to make it easy to produce pretty-printed text.
The data to be printed goes through a tree that carries all the
information required for pretty-printing. After that, a single call to
Easy_format.Pretty.to_stdout (for instance) outputs the indented result.
estring
[03-Nov-2008, version
0.1,
Alpha]
estring, which stands for `extended strings' is a library with a syntax extension allowing to see strings as lists of characters. It also define a new safe and extensible printf/scanf facility.
LablPCRE
[30-Jan-2007, version
1.0,
Stable]
A binding for PCRE, providing access to the POSIX regular expression pattern matching API of PCRE, fully supporting Linux and Windows builds of PCRE versions 6.1
- 7.0.
With an emphasis on simplicity and ease of use, LablPCRE offers a
small-footprint interface: four functions and a handful of public
methods in a returned "regresult" object.
Micmatch
[28-Jul-2008, version
1.0.0,
Stable]

Micmatch is a syntax extension of the pattern matching constructs of OCaml for matching and extracting substrings with regular expressions. Micmatch tries to stay as close as possible to the spirit of OCaml. Named regular expressions can be defined. They use the syntax of ocamllex with some additions. This extension is for Camlp5.
ocaml-text
[05-May-2009, version
0.2,
Beta]
OCaml-Text is a library for dealing with ``text'', i.e. sequence of unicode characters, in a convenient way.
Uunf
[09-Jan-2013, version
0.9.1,
Beta]

Uunf is an OCaml module for normalizing Unicode text. It supports all Unicode normalization forms and is independent from any IO mechanism or Unicode text data structure. Text can be processed without a complete in-memory representation.
Uutf
[09-Jan-2013, version
0.9.2,
Beta]

Uutf is an non-blocking streaming Unicode codec for OCaml to decode and encode the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently work character by character without blocking on IO. Decoders perform character position tracking and support newline normalization.
Functions are also provided to fold over the characters of UTF encoded OCaml string values and to directly encode characters in OCaml Buffer.t values.
Lexing and parsing
Jsonm
[07-May-2012, version
0.9.0,
Beta]

Jsonm is a non-blocking streaming codec to decode and encode the JSON data format. It can process JSON text without blocking on IO and without a complete in-memory representation of the data.
The uncut codec also processes whitespace and (non-standard) JSON with JavaScript comments.
Data structures
Fiblib
[25-Jul-2007, version
0.1,
Alpha]
An efficient, imperative Fibonacci heap library, based on the pseudocode of Cormen, Leiserson, Rivest, and Stein. Aims to be practical and elegant.
Oni
[24-Nov-2010, version
1.00,
Stable]

A modular framework of Objective Caml libraries comprising general purpose utilities and functional data structures, a more flexible abstraction of the system network sockets layer than the standard library, and modules to support the development of concurrent, single-threaded network application services with a functional programming style.
Uuidm
[19-Mar-2012, version
0.9.4,
Beta]

Uuidm is an OCaml module implementing 128 bits universally unique
identifiers version 3, 5 (name based with MD5, SHA-1 hashing) and 4
(random based) according to RFC 4122.
Uuidm is made of a single, independent, module and distributed under
the new BSD license.
Multimedia
3D graphics
CamlGL
[30-Dec-2002, version
0.9,
Beta]
OpenGL bindings for OCaml.
2D graphics
ocalibs
[17-May-2004,
Development code]
Ocalibs is a collection of libraries for the ocaml programming language, designed to make windows game development easier. It will support DirectX for graphics and ODE for physics.
Programming languages
Objective C - Objective Caml bridge for Mac OS X
[08-Jan-2008,
Alpha]
The goal of this project is to provide access to Mac OS X's APIs from OCaml. The project focuses on the set of APIs referred to as "Cocoa", that is APIs based on Objective C artefacts (classes, objects, protocols, methods). With such access to Cocoa's APIs, it is expected that OCaml programmers would be able to design, develop and build native MacOSX applications with ease.
Some features are explicitly out of scope: - general support of C-type apis (structs) - general support for Objective C (this project is targetted at Mac OS X) - platforms different from MacOSX
The targetted user is an intermediate level developer, at ease with all of OCaml constructs (including modules, classes, labels) and with Cocoa programming.
Program analysis
Olmar
[06-Nov-2006, version
0.2,
Beta]
Olmar connects Elsa, the Elkhound based C/C++ parser and typechecker, with Ocaml. More precisely, the Olmar extension can translate Elsa's internal abstract syntax tree into a value of an Ocaml variant type. This value can then be further processed with a pure Ocaml program. I prefer to have standalone Ocaml programs. Therefore I let Elsa marshal the abstract syntax tree as an Ocaml value to disk. However, it is also possible to link the Ocaml code into the Elsa executable.
Phpsa
[03-Apr-2006, version
0.1.1,
Beta]

PHP string analyzer is a static program analyzer that approximates the string output of a PHP program with a context-free grammar. The analyzer can be used to check properties of a PHP program. For example, it can be used to validate dynamically generated Web pages by a PHP program.
Constraint programming
Datalog
[31-Jan-2013, version
0.1,
Beta]
A small datalog fixpoint engine in OCaml, designed for incremental problems with lots of rules.
Compilers
CamlPy
[02-Apr-2008, version
0.1,
Development code]
A library for communicating
between python and OCaml, together with a little proof-of-concept
interface to WxPython, as a first step towards a better GUI tool for
OCaml.
Publishing
CamlPDF
[15-Mar-2010, version
0.5,
Beta]

CamlPDF is a library for reading, writing and manipulating PDF files
and data.
Melt
[24-Mar-2009, version
1.1.0,
Beta]

Melt is a set of libraries and tools which allows you to program LaTeX
documents using OCaml. This combines the typesetting power of LaTeX with
the programming power of OCaml. It can be combined with Mlpost to
include figures.
Science
Typing
Saffire
[31-May-2005,
Alpha]

Saffire is a static analysis program that detects bugs in programs that use the OCaml/C foreign function interface. Saffire works by performing type inference across both OCaml and C to make sure that values are used consistently across the language boundary. For instance, if a OCaml passes a record to a C function, that C function should not treat the data as an integer. Saffire also tracks what C variables point into the OCaml heap and ensure they are always registered with CAMLparam/local before any allocation functions are called.
Maths and Logic
Boolean Expression Simplifier
[19-Apr-2012, version
0.9.1.2,
Beta]
The Boolean Expression Simplifier library is an OCaml library providing means to simplify boolean expression.
Ocamlyices
[22-Sep-2010, version
0.4,
Beta]
Yet another binding for Yices SMT 1.x. Based on CamlIDL, this library
allows the access to both Yices APIs (full and light), unsatisfiable
cores, bit vectors, and more experimental features (interrupting,
switching between APIs).
Zenon
[09-Jan-2012, version
0.6.3,
Beta]
Zenon is an automatic theorem prover written in OCaml.
Zenon handles first-order logic with equality. Its most important feature is
that it outputs the proofs of the theorems, in Coq-checkable form.
Linguistics
Ocaml Link Grammar
[29-May-2006, version
0.1,
Beta]
OCaml interface to Link Grammar.
This package contains the OCaml interface to Link Grammar. It enables Ocaml
applications to use Link Grammar to parse English sentences.
OCaml WordNet
[19-Apr-2006, version
0.1,
Beta]

This package contains the OCaml Interface to WordNet 2.1. It enables Ocaml programs to use
the Wordnet dictionary for (english) word forms and meanings. This library directly parses the WordNet dictionary files, and does not depend on any other libraries. This library requires WordNet 2.1 to be installed (WordNet is available as a free download).
Sentence Segmenter
[03-Jul-2006,
Alpha]
This library can be used to segment Newspaper style (english) text articles into sentences. It uses the Ocaml lexer with a simple set of lexical rules to classify those periods ('.') in the text that end sentences.
Computing
Ott
[08-Jan-2007, version
0.10.2,
Alpha]


tool for
semantic definitions of programming languages and calculi.
The tool takes as input a definition of a language syntax and semantic
relations, in a concise and readable ASCII notation that is close to
what one would write in informal mathematics. It builds parsers for
symbolic and concrete terms of the language, generates LaTeX to build
a typeset version of the definition, and generates Coq, HOL, and
Isabelle versions of the definition.
Promela
[10-Sep-2012, version
0.4,
Beta]
The PROMELA library is an OCaml library providing types and functions to create, analyze and modify PROMELA programs as used by the Spin model checker.
Software development
Objsize
[23-Jul-2008, version
0.11,
Stable]
Objsize is a small OCaml library for computing size of OCaml values. It computes count of words used for values, count of values' headers, maximal depth of values. There are functions to get size of values in bytes too.
Language extensions
Mikmatch
[28-Jul-2008, version
1.0.0,
Beta]

The goal of Micmatch is to make text-oriented programs even easier to write, read and run without losing the unique and powerful features of Objective Caml (OCaml).
Micmatch provides a concise and highly readable syntax for regular expressions, and integrates it into the syntax of OCaml thanks to Camlp4.
Optcomp
[14-Jan-2009, version
1.0,
Stable]

Camlp4 syntax extension for optional compilation with cpp-like directives.
pa_bounds
[13-Mar-2006,
Beta]

A syntax extension which allows out-of-bounds accesses of arrays and alike to be reported with the exact location in the source code.
Development environments
utop
[16-Aug-2012, version
1.2,
Stable]
utop is a toplevel for OCaml which can run in a terminal or in emacs. It supports completion, colors, parenthesis matching, ...
Code generators
atdgen
[29-Aug-2011, version
1.2.0,
Stable]


Atdgen is a command-line program that takes as input type definitions in the ATD syntax and produces OCaml code suitable for data serialization and deserialization.
Hydro
[05-May-2009, version
0.7,
Beta]
Hydro is an independent implementation of ICE, the object-oriented RPC protocol by ZeroC, for the O'Caml programming language.
Hydro (like ICE) allows you to bridge language barriers by letting components written in different programming languages communicate with each other. ZeroC's ICE product currently includes implementations for C++, Java, C#, Python, Ruby, VB, and PHP. Hydro adds support for O'Caml. The ICE protocol is rich enough to make the representation of the data to communicate easy and convenient to use, and adopts an object-oriented type system. ZeroC sees ICE as a superior successor to CORBA.
OCaml-gir
[03-Nov-2009, version
0.9,
Beta]
OCaml-gir is an automated binding generator for glib-based libraries.
svgconv
[20-Jun-2007, version
1.0.5,
Stable]
Svgconv is a tool to convert SVG paths into a C format that can be easily used with OpenVG. The tool converts SVG graphics into C source code that can be #included into your C program that wishes to use the path data.
Build tools
Cppo
[29-Aug-2011, version
0.9.2,
Beta]

Cppo is an equivalent of the C preprocessor targeted at the OCaml language and its variants.
Its main purpose is to provide simple macro substitution (#define) and file inclusion (#include) for the occasional case when this is useful in OCaml.
The implementation of cppo relies on the standard library of OCaml and on the standard parsing tools Ocamllex and Ocamlyacc, which contribute to the robustness of cppo across OCaml versions.
ocaml-autoconf
[16-Oct-2009, version
1.1,
Stable]

Autoconf macros to support configuration of OCaml programs and libraries.
System
System programming
OBus
[13-Dec-2010, version
1.1,
Stable]
OBus is a pure ocaml implementation of DBus. It aims to provide a clean and easy way for ocaml programmers to access and provide dbus services.
OCaml-Sem
[07-Nov-2005, version
0.0.2,
Beta]
Sem is an OCaml module implementing support of POSIX semaphores. The package contains code in C and OCaml programming languages. Once compiled it makes a usual OCaml library usable in both byte-code and native code development.
Oclock
[22-Sep-2010, version
0.2,
Beta]
Precise POSIX clock library for Ocaml. This library uses the
clock_gettime(2) family of functions, to get precisions from below the
milliseconds upto the nanoseconds depending on the platform (system
and CPU).
It lets you measure time from the real-time clock, monotonic clocks,
or CPU-time clocks of the current process, of a remote process, or of
a thread.
Distributed and parallel programming
React
[19-Mar-2012, version
0.9.3,
Beta]

React is an OCaml module for
functional reactive programming (FRP). It
provides support to program with time varying values : applicative
events and signals. React doesn't define any primitive event or
signal, this lets the client chooses the concrete timeline.
Rtime
[19-Mar-2012, version
0.9.2,
Beta]

Rtime is an OCaml module implementing timelines for React [1]. It manages time stamp
events, delayed events and delayed signals along timelines. The client chooses the
concrete timeline by providing an absolute notion of time. Running the timeline at the
appropriate pace is left to the client.
User interfaces
Graphical toolkits
LablScintilla
[01-Feb-2007, version
0.9pre1,
Beta]
Caml for Scintilla is a free source and binary package which adds syntax coloring for the Objective Caml language to the multi-platform (Win32 and GTK+) Scintilla editing component and SciTE text editor.
Command line
Cmdliner
[09-Jan-2013, version
0.9.3,
Beta]

Cmdliner is an OCaml module for the declarative definition of command line interfaces.
It provides a simple and compositional mechanism to convert command line arguments to OCaml values and pass them to your functions. The module automatically handles syntax errors, help messages and UNIX man page generation. It supports programs with single or multiple commands (like darcs or git) and respects most of the POSIX and GNU conventions.
XML
XML formats
ocaml-osm-route
[03-Jun-2008,
Development code]
A quite simple program to do some basic routing over Open Streat Map maps. It parses an .osm.bz2 file, creates a compact data structure in memory (which is saved into a cache to speed up next searches), finds the OSM nodes closest to the source and goal points given as (latitude, longitude) couples, does the routing itself, prints it on the screen and saves it in .osm XML format (for example to load it into JOSM).
Uucd
[09-Jan-2013, version
0.9.2,
Beta]

Uucd is an OCaml module to decode the data of the Unicode character database from its XML representation. It provides high-level (but not necessarily efficient) access to the data so that efficient representations can be extracted.
Parsers and pretty-printers
xmlm
[19-Mar-2012, version
1.1.0,
Stable]

Xmlm is an OCaml module providing streaming XML input/output. It aims
at making XML processing robust and painless. The streaming interface
can process documents without building an in-memory representation. It
lets the programmer translate its data structures to XML documents and
vice-versa. Functions are provided to easily transform arborescent
data structures to/from XML documents.