Skip to content
Yotam Barnoy edited this page Apr 6, 2014 · 7 revisions

Basic Tools

Findlib/ocamlfind

ocamlfind could be said to be a pkg-config for OCaml. It is a tool for locating OCaml libraries on users' systems, so that users do not have to specify the location of each library themselves. ocamlfind is commonly used by other, more complex tools of all kinds, including build systems and the ocaml REPL.

Build Systems

Some of the following is taken from http://ocaml.org/learn/tutorials/dev_tools.html#Compilationtools

The default way to build medium to large projects on Unix platforms has long since been the GNU Make utility. This method, however, tends to be error-prone, and requires careful (and sometimes tedious) management of files. As a result, several tools have been developed to make building OCaml projects easier.

ocamlbuild

ocamlbuild is a relatively easy-to-use replacement for Makefiles that comes bundled along with OCaml. Advanced use of ocamlbuild involves creating a _tags file that specifies build rules for files and directories. More documentation can be found in the OCaml manual or at the ocamlbuild wiki.

OASIS

OASIS is a project modeled after Haskell's Cabal. It attempts to simplify the configure-build-install process for OCaml projects using ocamlbuild as its internal build system.

OASIS also integrates well with OPAM, OCaml's main package management system, using the oasis2opam utility.

OCamlMakefile

OMake

OMake is a build system designed for scalability and portability. It uses a syntax similar to make utilities you may have used, but it features many additional enhancements.

See the guide.

Package Managers

Package managers manage the automatic installation of software packages, libraries, and their dependencies. While operating systems such as Ubuntu or Mac OS have their own package managers, a common trend among languages recently has been to have language-specific package managers. This allows for uniformity along different platforms, greater flexibility and higher update frequencies than those provided by platform-specific package managers.

OPAM

OPAM is an extremely capable package manager that may be termed OCaml's central package management solution. Searching for a package is as easy as opam search package_name, while installing it involves only opam install package_name. OPAM can switch between different versions of the OCaml compiler, including the recent ability to try out any pull request submitted to the OCaml github page. One downside of OPAM is that Windows support is lacking (see Windows Support) NOTE: Does anyone know what exactly is missing in OPAM's Windows support? -YB

WODI

WODI is a Windows port of the now-defunct GODI, a predecessor of OPAM. Since OPAM doesn't support Windows, this is the only package management option available to Windows users. NOTE: Is this correct?