NAME¶dune-config - configuring the dune build system
DESCRIPTION¶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.
CACHING¶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.
JOBS¶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 4.
SANDBOXING¶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.
BUGS¶Check bug reports at https://github.com/ocaml/dune/issues