Opam is a source-based package manager for OCaml. It supports multiple simultaneous installations, flexible package constraints, and a Git-friendly development workflow.

Past Project Features

Opam in a box: 2013-2015

As Opam gets more widely used for teaching, it’s important to make it easy to distribute and install on a variety of operating systems. We are firstly generating binary packages for several Linux distributions (via the OpenSUSE Build Service and Ubuntu PPAs). There is also an ongoing effort to package up an Opam environment using virtualisation tools such as Vagrant and Docker.

View progress in the issue.

OPAMDoc: 2013

The OCaml toolchain has shipped with the ocamldoc tool for a long time - it runs over a single OCaml library and generates cross-referenced documentation. It also supports a variety of outputs, such as Latex, HTML, PDF and even manpages. However, it is starting to show its age for large, complex codebases such as Core, and so we are developing a more scalable alternative for the Platform effort.

OPAM-doc consists of two separate commands:

  • bin-doc is a replacement for the OCamldoc lexer (which extracts documentation from source code comments). It uses the OCaml-4.00+ facility for generating .cmt files that contain the typed AST, and generates .cmd files which contain the documentation information. By using a separate file from the AST, we leave open the possibility of having multiple language translations in the future. These .cmd and .cmdi files can be combined with the .cmt files to generate complete documentation directly from the output of the compiler. This command is intended to be temporary, and can be integrated into the upstream in the future.

  • opam-doc takes a set of cmt and cmd files and outputs a single JSON representation of all the files. This JSON can then be post-processed (or directly rendered in Javascript) to create a single documentation repository that reliably renders cross-references across entire libraries. Thus, the entire Platform can have one documentation source rather than having to search across packages.

The ultimate aim is to support the OCaml platform with interactive tutorials using the js_of_ocaml compiler. You can try out the prototype of this in OPAM via opam install opam-doc &&; opam doc core async. It will start a local webserver on which you can browse the traffic. There is also a snapshot available on the Mirage documentation.

Recent Activity

: Platforms, Packaging, Progress
: Major Releases of Cohttp, Conduit, DNS and TCP/IP Libraries
: OCaml 4.05.0 Released
: A Week of Platform Releases: Odig, Odoc, Opam Bundle and More!
: Opam 2.0.0 beta 3
: Using Menhir to Build Grammar Attributes
: OCaml 4.04.1 Released
: Composable Builds for OCaml with Jbuilder
: Irmin 1.0 Released!
: Scaling Software Modularization with Topkg
: MirageOS 3.0.0 Released!
: ICFP Roundup - Talk Summaries and OCaml Workshop
: ICFP 2016 Liveblog Available
: A new Reason for OCaml
: Seeing Double! Mirage 2.8 and 2.9 released
: Conex: Establishing trust into data repositories
: Jbuilder Demonstration
: Building and Publishing an OCaml Package, Q1 2017 by KC Sivaramakrishnan