OCaml is a general-purpose, industrial-strength programming language with an emphasis on expressiveness and safety.
– OCaml library for combinatorics .
A pure OCaml implementation of Zlib.
Implementation of Rabin's fingerprint and delta compression by P. MacDonald in OCaml (same as libXdiff
Fast implementation of queue (FIFO) in OCaml.
– A generic graph library for OCaml.
– Library of YIQ NTSC transmission image difference alghoritm implemented in OCaml and ReasonML.
– A large collection of data structures and algorithms for OCaml.
Library of Raft consensus algorithm implemented in OCaml
Jane Street Capital's dependency-free, quick-compiling, fully-portable across any environment that can run OCaml code standard library.
– A community-maintained foundation library for your OCaml projects.
– Declarative definition of command line interfaces for OCaml.
– Jane Street Capital's full-fledged standard library overlay. A portable subset of Core is also available: Corekernel.
– Pretty-printing library for OCaml.
– Minimalist library for command-line parsing.
– A lightweight, modular standard library extension, string library, and interfaces to various libraries (bigarrays, Unix, etc.) BSD license.
– Light library to deal with RPCs in OCaml.
– React is an OCaml module for functional reactive programming (FRP). It provides support for programs with time-varying values, declarative events, and signals.
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.
– 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-scale example dealing with the production of PDF files. There are questions for each chapter, along with worked-out answers and hints.
by Jon Harrop.
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.
Textbook on Functional Programming and Data Structures in OCaml - by Michael R. Clarkson et al.
by Richard Bird - It summarizes 30 hard algorithmic problems in the 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.
This is the first or only book focus on various data structures in FP world. A must-read one.
by Y. Minsky, A. Madhavapeddy, and J. Hickey - Functional Programming for the masses.
by X. Leroy and D. Rémy – Introduction to Unix Systems Programming, with an emphasis on communications between processes.
– This book describes both the OCaml language and the theoretical grounds behind its powerful type system.
Camelot is a modular and fully configurable OCaml linter and stylechecker.
Translator from OCaml to Coq to formally verify OCaml code.
flow is a static type checker for JavaScript.
Frama-C is a static analysis and formal proof framework for C and C++.
Infer is a static analyzer for Java, C and Objective-C
Mascot is a style-checker for OCaml sources.
MemCAD is an abstract interpreter for shape analysis. MemCAD can verify C programs manipulating complex data structures.
MOPSA is a generic framework for building sound static analyzers based on the theory of abstract interpretation.
– pfff is a set of tools and APIs to perform some static analysis, dynamic analysis, code visualizations, code navigations, or style-preserving source-to-source transformations such as refactorings on source code.
SLAyer is an automatic formal verification tool that uses separation logic to verify memory safety of C programs.
Parser combinators built for speed and memory efficiency
Caramel is a functional language for building type-safe, scalable, and maintainable applications.
cDuce is a modern XML-oriented functional language with innovative features.
It is a C Compiler supporting most of the ISO C90 and C99 / ANSI C features.
Eff is a functional language with handlers of not only exceptions, but also of other computational effects such as state or I/O.
Shopify's Liquid Templating language for OCaml.
A modern supercompiler for call-by-value functional languages.
– Menhir is a LR(1) parser generator for OCaml.
Mezzo is a programming language in the ML tradition, which places strong emphasis on the control of aliasing and access to mutable memory.
Originally the compiler was written in OCaml.
... and , a neat project to produce readable LaTeX, HTML, or plain-text EBNF-style documentation for your grammar.
OCaml to Java bytecode compiler.
See for a clearer example of using Menhir and Sedlex to produce a useful parser,
– lex and yacc implementation for OCaml.
– Self-contained monadic parser combinators for OCaml.
It is now a dead project. Github Repo. Alternative website.
Resource Aware ML (RaML) is a tool that automatically and statically computes resource-use bounds for OCaml programs.
Friendly syntax & toolchain for OCaml by Facebook.
– A Lisp on LLVM written in OCaml.
Originally written in OCaml before bootstrapping.
is a modern, encoding-agnostic (read: Unicode-supporting) lexer generator (the ppx-based successor to ulex.)
An interpreter for finding subtle bugs in programs written in standard C
Cooperative-threaded access to relational data
— A binding to the NDBM/GDBM Unix "databases".
dumb OCaml key-value store, string keys and string
by Oleg and Co.
— A distributed database that follows the same design principles as Git.
— Macaque is a library for safe and flexible database queries using comprehensions on top of PG'OCaml.
– An OCaml driver for Mongodb
– Bindings to libmysqlclient for interacting with MySQL databases.
– Implementation of MySQL Protocol with the Bitstring library.
— A database with BigTable-like data model atop LevelDB.
– Redis bindings for OCaml.
— ORM for SQLite.
— A type-safe interface to PostgreSQL in pure OCaml.
– A pure OCaml PostgreSQL client library.
— An interface to PostgreSQL through the C API (`libpq`).
– A syntax extension for embedded SQL queries using PG'OCaml.
It is a WIP database server written in OCaml.
Sequoia is a type-safe query builder for MySQL/MariaDB and PostgreSQL
— OCaml bindings to the SQLite3 database.
— Thin wrapper for SQLite3 with a simplified interface.
– An efficient, intuitive, and cross-platform web IDE with your OCaml code interpreted and running in your browser!
– Compile and execute OCaml code online.
– Library for binding to C libraries using pure OCaml.
– A command-line tool to manage Github Issues.
– An OCaml kernel for the Jupyter notebook.
. Web app (written in OCaml) underlying the learn-ocaml-corpus. Can be customized to serve lectures (with Markdown slides), playgrounds (with a toplevel prelude), and interactive exercises (with OCaml tests). MIT License.
. Minor mode for Emacs that can display exercise topics and grade exercise solutions, after logging to a Learn-OCaml instance. MIT License.
– Context sensitive completion for OCaml in Vim and Emacs.
– Emacs package to provide merlin's features through eldoc.
– extension that provides OCaml Debugger for VSCode
– Yeoman generator to scaffold OCaml modules.
An LSP language server for OCaml that integrates with any editor that understands LSP like VSCode, Vim and Emacs.
– Example build system for making mixed C/Ocaml binaries where the main program is in C.
Learn and execute OCaml code from your iPhone/iPad/Mac.
– A source and compiled interface browser, written using LablTk. Included in the standard distribution for ocaml = 4.02.
A command-line tool to format OCaml code.
– Small ncurses-based API and documentation browser.
– Indentation tool for OCaml, to be used from editors like Emacs and Vim.
– Easy access to the interface information of installed OCaml libraries. Provides standalone tools like `ocp-browser` and `ocp-grep`.
– Toplevel directive for looking up documentation using ocp-index.
Minor mode for Emacs that extends Tuareg and Merlin with menus to change or reset the opam switch in the ambient Emacs session.
– A PlantUML (**.puml**) to XML (**.xmi**) converter.
OCaml bindings for Python.
– Better OCaml mode for Sublime Text.
– Try OCaml in your web browser.
OCaml mode for Emacs that can run the toplevel and the debugger within Emacs.
– Universal toplevel for OCaml with support for multiline edition, history, real-time and context-sensitive completion, colors, and more.
.
– extension that provides OCaml language support for VSCode
. 99% of the solutions are here.
. Corpus of beginner-to-advanced online exercises (including those from the OCaml MOOC) with automatic grading tests.
– Exercism is your place to engage in thoughtful conversations about code. Explore simplicity, idiomatic language features, and expressive, readable code. Solutions.
The OCaml section of the book is a free reference for solving common programming problems using OCaml.
– Alt-Ergo is an open-source SMT solver dedicated to the proof of mathematical formulas generated in the context of program verification.
– 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.
– OCaml library for reading, writing and modifying PDF files.
Where X=OCaml.
– A neat interface for Slack in OCaml.
— 2D plotting library.
— Binding to Cairo, a 2D Vector Graphics Library. Integrates well with lablgtk.
— OpenGL bindings for OCaml. Provides an (experimental) functional API. (homepage)
— Interface to OpenGL. Integrates well with lablgtk.
— Thin bindings OpenGL 3.{2,3},4.{0,1,2,3,4} and OpenGL ES {2,3}.
– Declarative 2D vector graphics for OCaml.
— A Unicode library for OCaml.
— Multilingualization for OCaml source code. Allows using Unicode identifiers in OCaml source code.
— Unicode character database decoder for OCaml.
— Unicode character properties for OCaml.
— Unicode text normalization for OCaml.
— Unicode text segmentation for OCaml.
— Non-blocking streaming Unicode codec for OCaml.
Standard library for OCaml
C Intermediate Language
formal proof management system
platform dedicated to the analysis of source code written in C
library and tools for accessing and modifying virtual machine disk images
a swiss-army knife for multimedia streaming, notably used for netradios and webtvs
library operating system that constructs unikernels for secure, high-performance network applications across a variety of cloud computing and mobile platforms
cross-platform multi-network peer-to-peer daemon
Native, lightweight modal code editor.
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.
a self-upgradable Proof of Stake blockchain
platform for deductive program verification
management stack that configures and controls Xen-enabled hosts and resource pools, and co-ordinates resources within the pool.
.
.
Fully functional monadic implementation of a Neural Network (FCNNs) in OCaml
scikit-learn for OCaml.
Scientific library with neural networks, algorithmic differentiation and ONNX support.
OCaml bindings for PyTorch.
.
.
– AMQP client library for Async and Lwt.
– OCaml code generator plugin for the Cap'n Proto serialization framework.
– OCaml bindings for Apache Kafka.
– Message Passing Interface bindings for OCaml.
– OCaml implementation of the MQTT pubsub protocol.
– ZeroMQ bindings for OCaml with Async and Lwt wrappers.
– nanomsg bindings for OCaml.
Camlp4 is part of the standard OCaml distribution and is different from Camlp5.
Camlp5 is a preprocessor-pretty-printer of OCaml.
– 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.
– an OCaml dialect for multi-stage programming.
– A Yojson codec generator for OCaml.
– Import is a syntax extension that allows to pull in types or signatures from other compiled interface files.
– Monad syntax extension for OCaml.
– A simple ppx filter to support string interpolation like `[%str "value of foo is $(foo)"]`.
charrua-unix is a Unix DHCP daemon based on charrua-core.
– Fluentd logger for OCaml.
– A high performance, memory efficient, and scalable web server written in OCaml.
– Very lightweight HTTP server using Lwt or Async.
– A pure OCaml implementation of the DNS protocol.
– OCaml bindings to libcurl.
Client/server library for HTTP/1.X / HTTP/2 written entirely in OCaml.
.
Videos available in this playlist of the OCaml Software Foundation YouTube channel.
.
Course that uses OCaml to teach functional programming and programming language design
OCaml rules for Bazel, Google's multi-language and platform build tool.
Diskuv OCaml distribution for Windows.
– A composable and opinionated build system for OCaml (former jbuilder)
package.json workflow for native development with Reason/OCaml.
– Release OPAM packages easily.
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.
— Tool to convert OASIS metadata to OPAM package descriptions.
– Simple package build system for ocaml.
opam repository and experimental build for Windows (deprecated since 2021).
— Easy to use Makefile for small to medium-sized OCaml-projects.
— Local OCaml library manager. Used by most of the OCaml ecosystem.
– A flexible Git-friendly package manager with multiple compiler support.
— OPAM-aware packaging system using ocamlbuild.
. A compilation of resources
— A simple library for forking child processes to perform work on multiple cores.
— A distributed computing library which facilitates distributed execution of parallelizable computations in a seamless fashion.
– Process pool implementation for OCaml.
— An enhanced system platform library. Contains the `netmulticore` library to compute tasks on as many cores of the machine as needed.
from the officiel OCaml manual
– Parallelize computation over independent items, even if there is an infinite number of them.
— Provides easy-to-use parallel map and fold functions.
— A library for spawning processes on a cluster of machines, and passing typed messages between them.
– Functional parallel skeleton compiler and programming system for OCaml programs.
Libraries and syntax extensions to offload intensive computations to parallel accelerators (multicore CPUs, GPUs and other accelerators compatible with GPGPU frameworks).
, fully manual.
Reason's native
, also fully manual.
in Dune. It appears to also be fully manual.
, another ppx_deriving-like.
’s `[@@deriving show]`.
, a ppx_deriving-like.
, which appears to have the user build the type representation manually from combinators in addition to also having the user pass it where needed.
, again a ppx_deriving-like.
, probably a ppxderiving-like with ppxtyperep_conv.
BAP is a reverse engineering and program analysis platform that targets binary programs.
BinCat is a binary code static analysis toolkit.
cwe_checker finds vulnerable patterns in binary executables.
Owi is a toolchain for working with WebAssembly (Wasm) in OCaml, featuring a powerful, parallel symbolic execution engine for Wasm. It also provides frontends for compiling and analyzing C and Rust programs.
Smt.ml is a frontend OCaml library that interfaces with multiple SMT solvers, enabling seamless integration of solvers like Z3, cvc5, Colibri2, Bitwuzla, and Alt-Ergo within OCaml programs.
– OCaml Bioinformatics Library .
– OCaml library for building bioinformatics pipelines.
OCaml bindings for BLAS/LAPACK (high-performance linear algebra Fortran libraries).
OCaml library for multi-armed bandits.
Bindings to frequently used `C` special functions library.
OCaml library for general numerical work.
– Numerical library for OCaml.
OCaml numerical library: dense and sparse matrix, linear algebra, regressions, maths and stats functions.
A linear algebra library in OCaml with type-based static size checking for matrix operations.
– OCaml bindings for TensorFlow.
A system designed for the efficient calculation of multi-particle scattering cross sections and simulated event samples.
– Humane-re attempts to provide an easy interface for 90% of your regex needs. Courtesy of ocaml-re.
– bindings to the PCRE library (perl-compatible regular expressions)
– a pure OCaml regular expressions library with combinators, supporting several formats (glob, posix, str, etc.).
Tyre is a set of combinators to build type-safe regular expressions, allowing automatic extraction and modification of matched groups.
– The Cryptokit library for OCaml provides a variety of cryptographic primitives that can be used to implement cryptographic protocols in security-sensitive applications.
Hash algorithms (like SHA* or BLAKE2*) in OCaml and C.
A Commitment scheme library for Multi-party computations such as online auctions and gambling.
– A small cryptographic library behind the ocaml-tls project. It is built to be straightforward to use, adhere to functional programming principles, and able to run in a Xen-based unikernel.
– TLS in pure OCaml.
— A serialization compiler for multiple languages (OCaml, Java, Python, Scala, Typescript) with a Binou or JSON format
— Bencode (.torrent file format) reader/writer.
– Extensible binary data format, like JSON but faster.
— OCaml native CBOR decoder/encoder.
— Non-blocking streaming JSON codec for OCaml.
– A S-expression parser and printer
— A streaming codec to decode and encode the XML data format.
— An optimized parsing and printing library for the JSON format.
– Mirage is a programming framework for constructing secure, high-performance network applications across a variety of cloud computing and mobile platforms.
A compiler for ESP32 SoC.
– Read and write FAT-format filesystems from OCaml.
– Pure OCaml low-level git bindings.
– Pure OCaml implementation of the "vchan" shared-memory communication protocol.
An OCaml virtual machine for PIC18 micro-controlers.
A virtual machine designed to run OCaml bytecode on AVR (Arduino for instance) micro-controlers.
– A lightweight and colourful test framework.
— A framework for writing tests in OCaml, similar to Cram, developed by JaneStreet.
(formerly known as qtest) — supports inline pragma's to generate tests.
— comprehensive testing framework.
– 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.
— General inline testing macro's.
— QCheck is a property testing library inspired from Haskell's QuickCheck
A lightweight unit testing framework compatible with the Test Anything Protocol.
— GTK2 and GTK3 bindings for OCaml with various higher-level facilities to define GUIs.
– QML Qt5 bindings for OCaml.
— Interface to the Tcl/Tk GUI framework. In the standard distribution for ocaml <= 4.01.
– Lambda-Term is a cross-platform library for manipulating the terminal. It provides an abstraction for keys, mouse events, and colors, as well as a set of widgets to write curses-like applications.
Notty is a declarative terminal library for OCaml, structured around the notion of composable images.
Self-contained OCaml bindings to linenoise; easy high-level readline functionality in OCaml.
– Tsdl is an OCaml module providing thin bindings to the cross-platform SDL library.
Collision-resistant IDs for server scalability & database performance.
Official OCaml port of Sqids. Generate short unique IDs from numbers.
Uuidm is an OCaml module implementing 128-bit universally unique identifiers version 3, 5 (name based with MD5, SHA-1 hashing) and 4 (random based) according to RFC 4122.
PPX deriver designed to streamline the process of validating records.
– atd code generator (serialization) for OCaml/jsofocaml.
Easily import and export CommonJS modules from a jsofocaml project.
– 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.
– Hacker news like website with the OCaml framework Ocsigen
– Path-based dispatching for client- and server-side applications.
Tidy Web framework for OCaml and ReasonML
a library which helps to write web applications which run in the browser in a pure functional style.
genjsapi aims at simplifying the creation of OCaml bindings for Javascript libraries.
– An OCaml bindings generator for JavaScript libraries.
A library for building dynamic webapps, using Jsofocaml
– OCaml template engine almost compatible with jinja2.
– Jsofocaml is a compiler of OCaml bytecode to Javascript. It makes it possible to run Ocaml programs in a Web browser.
Functional HTML scraping and manipulation with CSS selectors, à la Python's Beautiful Soup.
Error-recovering streaming HTML5 and XML parsers, serializers.
– mustache.js logic-less templates in OCaml.
– RFC3986 URI parsing library.
Elm architecture and (V)DOM for OCaml
– 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.
– Sinatra like web toolkit for OCaml.
ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript.
Typed routes for OCaml/ReasonML web applications.
– RSS and Atom feed parsing
— Library to build valid (according to the W3C spec) Html and Svg trees.
– A REST toolkit for OCaml. OCaml webmachine is a layer on top of cohttp that implements a state-machine-based HTTP request processor. It's particularly well-suited for writing RESTful APIs. As the name suggests, this is an OCaml port of the webmachine project.