User Experience on mobile might not be great yet, but I'm working on it.

Your first time on this page? Allow me to give some explanations.

Awesome OCaml

A curated collection of awesome OCaml tools, frameworks, libraries and articles.

Here you can see meta information about this topic like the time we last updated this page, the original creator of the awesome list and a link to the original GitHub repository.

Last Update: Nov. 24, 2020, 6:05 p.m.

Thank you ocaml-community & contributors
View Topic on GitHub:
ocaml-community/awesome-ocaml

Search for resources by name or description.
Simply type in what you are looking for and the results will be filtered on the fly.

Further filter the resources on this page by type (repository/other resource), number of stars on GitHub and time of last commit in months.

Community

Algorithms and Data Structures

OCaml graph library

157
46
27d
n/a

Data structures and algorithms in OCaml

37
4
5m
n/a

OCaml library for combinatorics

25
2
4m
n/a

Pure OCaml implementation of Zlib.

79
18
17d
MIT

Fast implementation of queue in OCaml

29
4
4m
MIT

Pure OCaml implementation of libXdiff (Rabin's fingerprint)

9
2
4m
MIT

Library of Raft consensus algorithm implemented in OCaml

4
0
13d
Apache-2.0

Application Libraries

Batteries Included project

415
97
9d
n/a

Declarative definition of command line interfaces for OCaml

170
40
1y 5m
ISC

Jane Street Capital's standard library overlay

856
82
19d
n/a

Standard library for OCaml

473
57
5d
MIT

Minimalist OCaml library for command line parsing

19
2
49d
n/a

Pretty-printing library for OCaml

27
13
1y 14d
n/a

Light library to deal with RPCs in OCaml

75
29
52d
ISC

A lightweight, modular standard library extension, string library, and interfaces to various libraries (unix, threads, etc.) BSD license.

344
64
12d
BSD-2-Clause

React is an OCaml module for functional reactive programming (FRP). It provides support to program with time varying values: declarative events and signals.

Benchmarking

Micro-benchmarking library for OCaml

36
7
92d
MIT

Benchmarking module for OCaml

24
6
1y 74d
LGPL-3.0

Blogs

Books

In More OCaml John Whitington takes a meandering tour of functional programming with OCaml, introducing various language features and describing some classic algorithms. The book ends with a large worked example dealing with the production of PDF files. There are questions for each chapter together with worked answers and hints.

by Allen Downey and Nicholas Monje – How to Think Like a Computer Scientist is an introductory programming textbook based on the OCaml language. It is a modified version of Think Python by Allen Downey. It is intended for newcomers to programming and also those who know some programming but want to learn programming in the function-oriented paradigm, or those who simply want to learn OCaml.

by J. Whitington - OCaml from the Very Beginning will appeal both to new programmers, and experienced programmers eager to explore functional languages such as OCaml.

by Richard Bird - It summaries 30 hard algorithm problems in function programming world. Although it is for Haskell, the algorithm problems are very interesting and trying to solve them in OCaml also helps the thinking of functional programming. Partial solutions in OCaml are here.

by Y. Minsky, A. Madhavapeddy and J. Hickey - Functional programming for the masses.

by X. Leroy and D. Rémy – Introduction to Unix system programming, with an emphasis on communications between processes.

This book describes both the OCaml language and the theoretical grounds behind its powerful type system.

This is the first or only book focus on various data structures in FP world. A must-read one.

Code Analysis and Linters

pfff is mainly an OCaml API to write static analysis, dynamic analysis, code visualizations, code navigations, or style-preserving source-to-source transformations such as refactorings on source code.

67
8
5d
n/a

A static analyzer for Java, C, C++, and Objective-C

11.81K
1.59K
6d
MIT

Adds static typing to JavaScript to improve developer productivity and code quality.

21.05K
1.79K
5d
MIT

SLAyer is an automatic formal verification tool that uses separation logic to verify memory safety of C programs.

313
26
4y 4m
n/a

The MemCAD static analyzer

21
4
3y 52d
GPL-3.0

A fully-modular OCaml style linter

19
2
54d
Apache-2.0

Mascot is a style-checker for OCaml sources

Frama-C is a static analysis and formal proof framework for C and C++

Program analysis

Binary Analysis Platform

1.32K
218
5d
n/a

Binary code static analyser, with IDA integration. Performs value and taint analysis, type reconstruction, use-after-free and double-free detection

1.04K
136
8d
n/a

cwe_checker finds vulnerable patterns in binary executables

285
47
7d
LGPL-3.0

Compilers and Compiler Tools

🏞 an OCaml compiler for an untyped lisp

621
21
5y 9m
n/a

An interpreter for finding subtle bugs in programs written in standard C

516
28
3y 11m
n/a

Self-contained monadic parser combinators for OCaml

104
11
7m
MIT

An OCaml lexer generator for Unicode

156
31
62d
MIT

Nice parsers in OCaml without the boilerplate

87
10
91d
MIT

A simple multi-format pretty-printer for Menhir.

28
1
5m
MIT

Parser combinators built for speed and memory efficiency

405
48
20d
n/a

cDuce is a modern XML-oriented functional language with innovative features.

Fully-verified C compiler. Supports almost all of C89. GNU GPL2.1 or later

Eff is a functional language with handlers of not only exceptions, but also of other computational effects such as state or I/O.

Originally the compiler was written in OCaml.

Mezzo is a programming language in the ML tradition, which places strong emphasis on the control of aliasing and access to mutable memory.

Supports OCaml language v4. Generates plain Java bytecode and have seamless integration with Java.

Originally written in OCaml before bootstrapping.

Friendly syntax & toolchain for OCaml by Facebook.

Resource Aware ML (RaML) is a tool that automatically and statically computes resource-use bounds for OCaml programs.

Menhir is a LR(1) parser generator for OCaml.

Concurrency

Databases

Syntax extension for embedded SQL queries using PG'OCaml.

50
8
82d
BSD-3-Clause

OCaml bindings to the SQLite3 database

77
24
112d
n/a

Redis bindings for OCaml

56
24
96d
BSD-3-Clause

A pure OCaml PostgreSQL client library

94
8
5m
n/a

OCaml implementation of MySQL Protocol with the Bitstring library

8
1
4d
n/a

Irmin is a distributed database that follows the same design principles as Git

1.38K
122
5d
ISC

Open Source Social Database

11
0
5y 10m
MIT

OCaml type-safe query builder with syntax tree extension

107
13
1y 7m
n/a
35
11
1y 8d
n/a

Object Relational Mapper extension

47
7
4y 5m
n/a

Cooperative-threaded access to relational data

160
16
12d
LGPL-3.0

Dbm

A binding to the NDBM/GDBM Unix "databases".

An OCaml driver for Mongodb

A type-safe interface to PostgreSQL in pure OCaml.

An interface to PostgreSQL through the C API (libpq).

Thin wrapper for SQLite3 with a simplified interface.

Bindings to libmysqlclient for interacting with MySQL databases.

A database with BigTable-like data model atop LevelDB.

Datetime

Parser and printer for date-times in ISO8601

26
5
1y 75d
MIT

date and duration in ocaml

20
7
7d
MIT

Developer Tools

An OCaml kernel for Jupyter (IPython) notebook

166
19
67d
MIT

Universal toplevel for OCaml

625
70
5m
n/a

Auto-formatter for OCaml code

369
75
7d
MIT

A command-line tool to manage Github Issues

18
1
6y 6m
n/a

🐫Yeoman generator to scaffold OCaml modules.

21
4
2y 5m
MIT

Library for binding to C libraries using pure OCaml

282
66
11d
MIT

Example build system for making mixed C/Ocaml binaries where the main program is in C

15
0
3y 54d
n/a

OCaml bindings for Python

86
14
6m
n/a

Context sensitive completion for OCaml in Vim and Emacs

1.27K
163
4d
MIT

Emacs OCaml mode

282
59
6m
GPL-2.0

Type and doc on hover for OCaml and Reason in emacs

33
2
1y 88d
GPL-3.0

An extension for VS Code which provides support for the OCaml language.

172
25
2y 56d
MIT

OCaml debug adapter

83
7
11m
MIT

Default Sublime Text highlighting for OCaml sucks. I've fixed it.

21
5
2y 9m
n/a

Merlin 2 package for Sublime Text 3

13
1
3y 5m
MIT
17
0
3y 80d
ISC

Integration of ocp-indent to vim.

27
8
2y 8m
MIT

Code coverage for OCaml and Reason

195
34
17d
MIT

Try OCaml in your web browser.

Compile and execute OCaml code online.

A source and compiled interface browser, written using LablTk. Included in the standard distribution for ocaml <= 4.01 and with labltk for ocaml >= 4.02.

Easy access to the interface information of installed OCaml libraries. Provides standalone tools like ocp-browser and ocp-grep.

Small ncurses-based API and documentation browser.

Indentation tool for OCaml, to be used from editors like Emacs and Vim.

Exercises

Exercism is your place to engage in thoughtful conversations about code. Explore simplicity, idiomatic language features, and expressive readable code. Solutions.

Formal Software Verification

Coq

Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs.

Why3 is a platform for deductive program verification. It provides a rich language for specification and programming, called WhyML, and relies on external theorem provers, both automated and interactive, to discharge verification conditions.

Alt-Ergo is an open-source SMT solver dedicated to the proof of mathematical formulas generated in the context of program verification.

General

Graphics

Binding to Cairo, a 2D Vector Graphics Library.

32
6
59d
LGPL-3.0

Declarative 2D vector graphics for OCaml

63
9
6m
ISC

OCaml bindings for OpenGL

13
1
39d
MIT

Interface to OpenGL. Integrates well with lablgtk.

Thin bindings OpenGL 3.{2,3},4.{0,1,2,3,4} and OpenGL ES {2,3}.

Internationalization

A Unicode library for OCaml

92
18
1y 110d
n/a

Multilingualization for the OCaml source code

43
4
2y 89d
MIT

Unicode character database decoder for OCaml

9
3
8m
ISC

Unicode character properties for OCaml

14
6
7m
ISC

Unicode text normalization for OCaml

10
4
8m
ISC

Unicode text segmentation for OCaml

12
3
8m
ISC

Non-blocking streaming Unicode codec for OCaml

21
10
1y 9m
ISC

User Interface

Interfacing Qt/QML with OCaml. Formely known as lablqt

134
13
6m
n/a

Terminal manipulation library for OCaml

165
35
108d
n/a

Declarative terminal graphics for OCaml

239
13
6m
ISC

Self-contained OCaml bindings to linenoise, easy high level readline functionality in OCaml

34
3
6m
n/a

GTK2 bindings for OCaml with various higher-level facilities to define GUIs.

Interface to the Tcl/Tk GUI framework. In the standard distribution for ocaml <= 4.01.

Tsdl is an OCaml module providing thin bindings to the cross-platform SDL library.

Language-related

Large Source Code Examples

Standard library for OCaml

473
57
5d
MIT

C Intermediate Language

261
66
8m
n/a

Coq is a formal proof management system. It provides a formal language to write mathematical definitions, executable algorithms and theorems together with an environment for semi-interactive development of machine-checked proofs.

2.95K
456
84d
LGPL-2.1
374
21
29d
n/a

library and tools for accessing and modifying virtual machine disk images. PLEASE DO NOT USE GITHUB FOR ISSUES OR PULL REQUESTS. See the website for how to file a bug or contact us.

390
130
13d
n/a

Audio and video streaming language

672
90
9d
GPL-2.0

MirageOS is a library operating system that constructs unikernels

1.54K
198
30d
ISC

cross-platform multi-network p2p daemon

131
28
12d
GPL-2.0

Native, lightweight modal code editor

4.76K
192
29d
n/a

pfff is mainly an OCaml API to write static analysis, dynamic analysis, code visualizations, code navigations, or style-preserving source-to-source transformations such as refactorings on source code.

67
8
5d
n/a

The Xapi Project's XenAPI Server

300
242
12d
n/a

Logging

A dumb OCaml logger

25
6
1y 63d
n/a

Volt - A variant of Bolt OCaml logging tool

3
0
11m
LGPL-3.0

Logs provides a logging infrastructure for OCaml.

Machine Learning

scikit-learn for OCaml

18
1
5m
BSD-3-Clause

Implementation of the Mask R-CNN model using OCaml's numerical library Owl.

16
2
10m
n/a

OCaml bindings for PyTorch

290
22
25d
Apache-2.0

Owl

Scientific library with neural networks, algoritmic differentiation and ONNX support.

Messaging

ZeroMQ bindings for OCaml

66
12
10m
n/a

nanomsg bindings for ocaml

37
8
28d
WTFPL

OCaml bindings for Kafka

41
10
37d
MIT

OCaml Amqp client library for Async and Lwt.

54
11
59d
BSD-3-Clause

OCaml/MPI interface

18
9
80d
n/a

OCaml implementation of the MQTT pubsub protocol.

18
4
3y 9m
n/a

OCaml code generator plugin for the Cap'n Proto serialization framework

73
11
26d
n/a

Metaprogramming

Less redundancy in type declarations and signatures

71
15
4m
MIT

A simple OCaml ppx filter to support string interpolation like [%str "value of foo is $(foo)"]

19
0
6y 27d
Unlicense

Minimalistic monad syntax for OCaml.

6
0
3y 8m
MIT

A Yojson codec generator for OCaml.

115
40
18d
MIT

an OCaml dialect for multi-stage programming.

Fan

Fan is a compile-time metaprogramming system for OCaml, originally inspired from Camlp4. It's a combination of OCaml and Lispy Macros. It shares the same concrete syntax with OCaml.

Camlp5 is a preprocessor-pretty-printer of OCaml.

Camlp4 is part of the standard OCaml distribution and is different from Camlp5.

Metrics

OCaml library for reporting metrics to a Prometheus server

25
10
16d
Apache-2.0

Mobile Applications

Networking

An OCaml library for HTTP clients and servers using Lwt or Async

513
138
18d
n/a

OCaml bindings to libcurl

44
18
9m
MIT

A high performance, memory efficient, and scalable web server written in OCaml

434
28
10d
n/a

OCaml implementation of the DNS protocol

64
35
8d
BSD-2-Clause

A structured logger for Fluentd (OCaml)

6
1
6y 89d
Apache-2.0

A DHCP server for UNIX systems based on charrua-core.

12
2
3y 6m
ISC

Online Courses

Package Management

makorel - Release OPAM packages easily

8
0
5y 11m
MIT

package.json workflow for native development with Reason/OCaml

690
77
4d
n/a

Tool to convert OASIS metadata to OPAM package descriptions

28
7
3y 72d
n/a

simple package build system for ocaml

50
19
1y 8m
BSD-2-Clause

A composable build system for OCaml.

1.02K
233
6d
MIT

Build system

89
11
2y 68d
n/a

Easy to use Makefile for small to medium-sized OCaml-projects

67
15
1y 46d
n/a

The transitory OCaml software packager

66
24
68d
ISC

Sane file naming for OCaml projects.

69
3
3y 59d
n/a

OCaml build rules for Bazel

30
9
4m
Apache-2.0

A flexible Git-friendly package manager with multiple compiler support.

Local OCaml library manager. Used by most of the OCaml ecosystem.

opam repository and experimental build for Windows.

A tool to integrate a configure, build and install system in your OCaml project. It helps to create standard entry points in your build system and allows external tools to analyse your project easily.

Build system provided with the compiler.

Parallelism

OCaml library for forking child processes to perform work on multiple cores

20
3
7y 7m
n/a

Type-safe library for building parallel applications, built on top of Async's Rpc module.

43
7
5d
MIT

Process pools for OCaml

29
6
7y 91d
n/a

Parallelize anything //

24
3
6m
n/a

Stream Processing with OCaml

115
8
7m
n/a

Provides easy-to-use parallel map and fold functions.

A distributed computing library which facilitates distributed execution of parallelizable computations in a seamless fashion.

An enhanced system platform library. Contains the netmulticore library to compute tasks on as many cores of the machine as needed.

Functional parallel skeleton compiler and programming system for OCaml programs.

Project Starter Templates

drom is a wrapper over opam/dune in an attempt to provide a cargo-like user experience. It can be used to create full OCaml projects with sphinx and odoc documentation. It has specific knowledge of Github and will generate files for Github Actions CI and Github pages.

47
4
26d
n/a

Reason and OCaml project generator.

224
8
31d
MIT

Template for an ocaml project with modern tooling

38
0
54d
AGPL-3.0

Questions

Science and Technical Computing

OCaml Bioinformatics Library

98
18
119d
n/a

OCaml library for building bioinformatics pipelines

4
0
1y 10m
n/a

Numerical Library for OCaml

8
0
6y 7m
n/a

OCaml Math Library

111
9
2y 9m
Apache-2.0

Bindings to special math functions from the Cephes library.

10
3
4y 5m
BSD-3-Clause

BLAS and LAPACK binding in OCaml with type-based static size checking for matrix operations

73
4
4m
LGPL-2.1

OCaml bindings for TensorFlow

273
23
1y 4m
Apache-2.0

Owl - OCaml Scientific and Engineering Computing @ http://ocaml.xyz

894
84
11d
MIT

OCaml bindings for BLAS/LAPACK (high-performance linear algebra Fortran libraries).

OCaml library for multi-armed bandits.

Regular Expressions

Pure OCaml regular expressions, with support for Perl and POSIX-style strings

165
47
5m
n/a

OCaml bindings to PCRE (Perl Compatibility Regular Expressions)

20
7
113d
n/a

The human friendly interface to ocaml-re

23
2
1y 70d
n/a

Typed Regular Expressions

143
2
10m
ISC

Security and Cryptography

TLS in pure OCaml

246
50
20d
BSD-2-Clause

Simple hash algorithms in OCaml

65
19
8d
MIT

A library of cryptographic primitives (ciphers, hashes, etc) for OCaml

60
16
42d
n/a

A Commitment Scheme library for Coin Flipping/Tossing algorithms and sort.

5
0
1y 113d
MIT

OCaml cryptographic library

99
50
1y 9m
ISC

Semantic Technology

OCaml library to manipulate RDF graphs and execute Sparql queries.

Serialization

Bencode (.torrent file format) reader/writer in OCaml

17
3
11m
n/a

Extensible binary data format, like JSON but faster

32
12
1y 114d
n/a

OCaml CBOR generic decoder/encoder, RFC 7049, http://cbor.io/

14
5
11m
MIT

Low-level JSON parsing and pretty-printing library for OCaml

190
40
21d
BSD-3-Clause

Automated S-expression conversion

110
19
19d
n/a

Non-blocking streaming JSON codec for OCaml.

A streaming codec to decode and encode the XML data format.

System Programming

MirageOS is a library operating system that constructs unikernels

1.54K
198
30d
ISC

Read and write FAT format filesystems from OCaml

16
14
1y 5d
ISC

Pure OCaml Git format and protocol

291
59
33d
ISC

Pure OCaml implementation of the "vchan" shared-memory communication protocol

38
20
35d
ISC

An OCaml generic virtual machine for microcontrollers

84
18
7m
n/a
18
2
2y 10m
n/a

An OCaml virtual machine for PIC18 micro-controlers.

Testing

A lightweight and colourful test framework

243
51
71d
ISC

QuickCheck inspired property-based testing for OCaml.

184
20
13d
BSD-2-Clause

Inline (Unit) Tests for OCaml

53
5
80d
GPL-3.0

Test::Simple, for OCaml

13
1
5y 9m
n/a

Cram like framework for OCaml

75
9
19d
MIT

OUnit is a unit test framework for OCaml. It allows one to easily create unit-tests for OCaml code. It is based on HUnit, a unit testing framework for Haskell.

comprehensive testing framework.

Utilities

CUID generator for OCaml.

16
0
1y 22d
MIT

Web Development

Sinatra like web toolkit for OCaml

575
54
8d
MIT

A REST toolkit for OCaml

202
25
64d
n/a

A library for building dynamic webapps, using Js_of_ocaml.

278
23
5d
MIT

Elm architecture and (V)DOM for OCaml

148
11
6m
MIT

Caml on the Web (COW) is a set of parsers and syntax extensions to let you manipulate HTML, CSS, XML, JSON and Markdown directly from OCaml code.

99
21
10m
n/a

Import and export CommonJS modules in js_of_ocaml

13
2
4y 6m
MIT

The compiler for ReScript.

4.88K
363
6d
n/a

RFC3986 URI parsing library for OCaml

76
46
42d
n/a

An OCaml bindings generator for JavaScript libraries

38
8
6y 4m
n/a

RSS and Atom feed parsing

27
10
1y 6m
MIT

mustache.js logic-less templates in OCaml

57
20
1y 7m
MIT

atd code generator for OCaml/js_of_ocaml

9
0
7y 63d
n/a

OCaml template engine almost compatible with jinja2

85
17
10d
n/a

Path-based dispatching for client- and server-side applications.

37
7
6m
n/a

Functional HTML scraping and rewriting with CSS in OCaml

275
22
17d
MIT

Error-recovering streaming HTML5 and XML parsers

120
10
17d
MIT

Easy OCaml bindings for Javascript libraries

132
20
27d
MIT

typed bidirectional routes for OCaml/ReasonML web applications

99
8
5d
BSD-3-Clause

A friendly and minimalist link sharing website

44
3
5y 6m
MIT

Eliom is a full-featured multi-tier framework, for developing multi-platform Web and mobile apps as 100% OCaml distributed applications. It can also be used for more traditional Web or mobile apps: Web sites, single page applications, REST API, etc.

An enhanced system platform library. Contains the netmulticore library to compute tasks on as many cores of the machine as needed.

Library to build valid (according to the W3C spec) Html and Svg trees.

Js_of_ocaml is a compiler of OCaml bytecode to Javascript. It makes it possible to run Ocaml programs in a Web browser.