View on GitHub


Documenting everything about OCaml



This page describes the current state of the OCaml ecosystem.

Help Needed

For a list of things currently missing in OCaml’s ecosystem, see Help Needed

Standard Libraries

For an overview of the different standard library options and recommendations, see Standard Libraries.

Data Structures and Algorithms

See Data Structures and Algorithms


See Audio

Build System/Package Management

See Build System and Package Management

Cloud Computing

  • aws-s3: Access to Amazon’s Simple Storage Solution (S3)
  • Google Drive OCamlFuse: A User file system for Google Drive. Also one of the few ways to sync Google Drive from Linux.

Code Tools

See Code Tools

Command Line Arguments

  • The standard library contains the Arg module, which has a simple syntax for defining command line arguments. However, it uses mutable state for arguments, and doesn’t have a built-in way to handle things such as sub-arguments, or argument aliases (long and short) for the same command, though these things can be done.
  • Cmdliner is a declarative approach to laying out command-line arguments. The library uses combinators to build up the desired arguments.
  • BOS - Basic OS Interaction is a general OS abstraction library which also contains a command line argument module (BOS.OS.Arg).
  • Jane Street’s Core standard library contains the Command module, which takes a similar approach to Cmdliner.
  • Minicli is a self-described minimalist library for command line parsing.


For compilation tools made in OCaml, see Compilers

Concurrency, Parallelism, Distributed Computing

See Concurrency, Parallelism and Distributed Computing


See Databases


  • OCaml comes with a built-in debugger for the bytecode compiler. You invoke it with the ocamldebug command. See the manual for more details.
  • The easiest way to debug OCaml code, other than inserting print statements, is choosing bytecode as your compilation target, and using teh OCaml debugger.
  • Additionally, one can use gdb to debug native code.

Formal Software Verification

See Formal Software Verification

File Formats

For manipulating different file formats from OCaml, see File Formats

File Manipulation

See File Manipulation.

Foreign Function Interface

For integrating with C, C++, Python etc., see Foreign Function Interface.

Functional Reactive Programming

See Functional Reactive Programming.


For graphic libraries, see Graphics.

Hardware Design

For usage of OCaml in hardware design, see Hardware Design


See Iterators


Accessors: a Lens library (easy access/functional updates to records).


  • dolog: a simple OCaml logger.
  • Volt: a variant of Bolt OCaml logging tool.
  • Logs: provides a logging infrastructure for OCaml.
  • easy-logging: An object-based simple logging module.

Machine Learning, Data Science, Scientific Computing

For machine learning, data science and scientific computing, see Scientific Computing

Metaprogramming and PPX

For metaprogramming facilities such as PPX, camlp4 and MetaOCaml, see Metaprogramming.


For compilation of OCaml to mobile platforms, see Mobile.


See Monads.

Pretty printing

See Pretty Printing.

Process Management

See Process Management.


For support of protocols, see Protocols


See Profiling.

Regular Expressions

See Regular Rxpressions

Static Analysis

For static analysis using OCaml, see Static Analysis


For libraries related to search, see Searching

String Manipulation

  • The standard library’s String module is somewhat lacking in terms of functionality.
  • Containers has an expanded String module, with iteration functions and so on. Containers strives to be backwards-compatible with the Stdlib.
  • AString: another implementation of expanded string functionality, with less regard for standard library compatibility
  • Bigstring: On 32-bit platforms, OCaml strings are constrained to 20MB sizes. This library allows one to handle strings of any sizes, and also to handle C-style strings as if they were OCaml strings. Built on top of BigArray, and supports memory-mapping.
  • Bigstring/af: another implementation of a string overlay on top of BigArray, with similar benefits. Emphasizes speed.

Systems Programming

For low-level systems programming, see Systems Programming

Testing Frameworks

For testing frameworks in OCaml, see Testing

Time and Date

  • For short-term timing requirements, Sys.time can do the job.
  • mtime: wall-clock monotonic time, and the best choice for longer-running timing requirements.
  • ptime: POSIX time.
  • ISO8601
  • calendar
  • odate

Unicode Support

See Unicode

User Interface

For GUIs and TUIs (Terminal User Interfaces), see User Interface

Web and Networking

For libraries related to web development and networking, see Web and Networking