Your company here ā€” click to reach over 10,000 unique daily visitors

dune-config - Man Page

configuring the dune build system




Unless --no-config or -p is passed, Dune will read a configuration file from the user home directory. This file is used to control various aspects of the behavior of Dune.

The configuration file is normally ~/.config/dune/config on Unix systems and Local Settings/dune/config in the User home directory on Windows. However, it is possible to specify an alternative configuration file with the --config-file option.

The first line of the file must be of the form (lang dune X.Y) where X.Y is the version of the dune language used in the file.

The rest of the file must be written in S-expression syntax and be composed of a list of stanzas. The following sections describe the stanzas available.


Syntax: (cache ENABLED)

This stanza determines whether dune's build caching is enabled. See https://dune.readthedocs.io/en/stable/caching.html for details. Valid values for ENABLED are enabled or disabled.

Display Modes

Syntax: (display MODE)

This stanza controls how Dune reports what it is doing to the user. This parameter can also be set from the command line via --display MODE. The following display modes are available:


This is the default, Dune shows and update a status line as build goals are being completed.


Only display errors.


Print one line per command being executed, with the binary name on the left and the reason it is being executed for on the right.


Print the full command lines of programs being executed by Dune, with some colors to help differentiate programs.

Note that when the selected display mode is progress and the output is not a terminal then the quiet mode is selected instead. This rule doesn't apply when running Dune inside Emacs. Dune detects whether it is executed from inside Emacs or not by looking at the environment variable INSIDE_EMACS that is set by Emacs. If you want the same behavior with another editor, you can set this variable. If your editor already sets another variable, please open a ticket on the ocaml/dune GitHub project so that we can add support for it.


Syntax: (jobs NUMBER)

Set the maximum number of jobs Dune might run in parallel. This can also be set from the command line via -j NUMBER.

The default for this value is the number of processors.


Syntax: (sandboxing_preference MODE ...)

Controls the sandboxing mode preference order used by dune. Dune will use the earliest item from this list that's allowed by the action dependency specification, or fall back on the hard-coded default. See man dune-build for the description of individual modes.


Check bug reports at https://github.com/ocaml/dune/issues

Referenced By

dune-build(1), dune-clean(1), dune-describe(1), dune-diagnostics(1), dune-exec(1), dune-external-lib-deps(1), dune-fmt(1), dune-install(1), dune-installed-libraries(1), dune-monitor(1), dune-ocaml-merlin(1), dune-printenv(1), dune-promote(1), dune-rules(1), dune-runtest(1), dune-shutdown(1), dune-test(1), dune-top(1), dune-uninstall(1), dune-upgrade(1), dune-utop(1).

Dune manual