2017-05-14 00:10:00 +00:00
|
|
|
********
|
|
|
|
Overview
|
|
|
|
********
|
|
|
|
|
2018-06-29 13:27:35 +00:00
|
|
|
Dune is a build system for OCaml and Reason. It is not intended as a
|
2017-05-14 00:10:00 +00:00
|
|
|
completely generic build system that is able to build any given project
|
|
|
|
in any language. On the contrary, it makes lots of choices in order to
|
|
|
|
encourage a consistent development style.
|
|
|
|
|
|
|
|
This scheme is inspired from the one used inside Jane Street and adapted
|
|
|
|
to the opam world. It has matured over a long time and is used daily by
|
|
|
|
hundred of developers, which means that it is highly tested and
|
|
|
|
productive.
|
|
|
|
|
2018-06-29 13:27:35 +00:00
|
|
|
When using dune, you give very little and high-level information to
|
2017-06-17 16:06:58 +00:00
|
|
|
the build system, which in turn takes care of all the low-level
|
2017-05-14 00:10:00 +00:00
|
|
|
details, from the compilation of your libraries, executables and
|
2017-06-17 16:06:58 +00:00
|
|
|
documentation, to the installation, setting up of tests, setting up of
|
2017-05-14 00:10:00 +00:00
|
|
|
the development tools such as merlin, etc.
|
|
|
|
|
|
|
|
In addition to the normal features one would expect from a build system
|
2018-06-29 13:27:35 +00:00
|
|
|
for OCaml, dune provides a few additional ones that detach it from
|
2017-05-14 00:10:00 +00:00
|
|
|
the crowd:
|
|
|
|
|
2018-06-29 13:27:35 +00:00
|
|
|
- you never need to tell dune where things such as libraries are.
|
|
|
|
Dune will always discover them automatically. In particular, this
|
2017-06-17 16:06:58 +00:00
|
|
|
means that when you want to re-organize your project you need to do no
|
2018-06-29 13:27:35 +00:00
|
|
|
more than rename your directories, dune will do the rest
|
2017-05-14 00:10:00 +00:00
|
|
|
|
|
|
|
- things always work the same whether your dependencies are local or
|
2017-06-17 16:06:58 +00:00
|
|
|
installed on the system. In particular, this means that you can always
|
2017-05-14 00:10:00 +00:00
|
|
|
drop in the source for a dependency of your project in your working
|
2018-06-29 13:27:35 +00:00
|
|
|
copy and dune will start using it immediately. This makes dune a
|
2017-05-14 00:10:00 +00:00
|
|
|
great choice for multi-project development
|
|
|
|
|
2018-06-29 13:27:35 +00:00
|
|
|
- cross-platform: as long as your code is portable, dune will be
|
|
|
|
able to cross-compile it (note that dune is designed internally
|
2017-05-14 00:10:00 +00:00
|
|
|
to make this easy but the actual support is not implemented yet)
|
|
|
|
|
2018-06-29 13:27:35 +00:00
|
|
|
- release directly from any revision: dune needs no setup stage. To
|
2017-05-14 00:10:00 +00:00
|
|
|
release your project, you can simply point to a specific tag. You can
|
|
|
|
of course add some release steps if you want to, but it is not
|
|
|
|
necessary
|
|
|
|
|
|
|
|
The first section of this document defines some terms used in the rest
|
2018-06-29 13:27:35 +00:00
|
|
|
of this manual. The second section specifies the dune metadata
|
|
|
|
format and the third one describes how to use the ``dune`` command.
|