This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1,5 @@
action_stderr_on_success
------------------------
Same as :doc:`action_stdout_on_success`, but applies to standard error instead
of standard output.

View file

@ -0,0 +1,17 @@
action_stdout_on_success
------------------------
Specifies how Dune should handle the standard output of actions when they succeed.
This can be used to reduce the noise of large builds.
.. code:: dune
(action_stdout_on_success <setting>)
where ``<setting>`` is one of:
- ``print`` prints the output on the terminal. This is the default.
- ``swallow`` ignores the output and does not print it on the terminal.
- ``must-be-empty`` enforces that the output should be empty. If it is not, Dune will fail.

View file

@ -0,0 +1,19 @@
cache
-----
Specifies whether Dune is allowed to store and fetch build targets from the Dune
cache.
.. code:: dune
(cache <setting>)
where ``<setting>`` is one of:
- ``enabled`` enables Dune cache.
- ``enabled-except-user-rules`` enables the Dune cache, but exclude user-written
rules. This setting is a conservative choice that can avoid breaking rules
whose dependencies are not correctly specified. Currently the default.
- ``disabled`` disables Dune cache.

View file

@ -0,0 +1,16 @@
cache-check-probability
-----------------------
While the main purpose of Dune cache is to speed up build times, it can also be
used to check build reproducibility. It is possible to enable a probabilistic
check, in which Dune will re-execute randomly chosen build rules and compare
their results with those stored in the cache. If the results differ, the rule is
not reproducible, and Dune will print out a corresponding warning.
.. code:: dune
(cache-check-probability <number>)
where ``<number>`` is a floating-point number between 0 and 1 (inclusive). 0
means never to check for reproducibility, and 1 means to always perform the
check.

View file

@ -0,0 +1,19 @@
cache-storage-mode
------------------
Specify the mechanism used by the Dune cache for storage.
.. code:: dune
(cache-storage-mode <setting>)
where ``<setting>`` is one of:
- ``auto`` lets Dune decide the best mechanism to use.
- ``hardlink`` uses hard links for entries in the cache. If the cache is stored
in a different partition than the one where the build is taking place, then
this mode will not work and ``copy`` should be used instead.
- ``copy`` copies entries to the cache. This is less efficient than using hard
links.

View file

@ -0,0 +1,21 @@
display
-------
Specify the amount of Dunes verbosity.
.. code:: dune
(display <setting>)
where ``<setting>`` is one of:
- ``progress``, Dune shows and updates a status line as build goals are being
completed. This is the default value.
- ``verbose`` prints the full command lines of programs being executed by Dune,
with some colors to help differentiate programs.
- ``short`` prints a line for each program executed with the binary name on the
left and the targets of the action on the right.
- ``quiet`` only display errors.

View file

@ -0,0 +1,27 @@
config
======
This file is used to set Dune's global configuration, which is applicable
across projects and workspaces.
The configuration file is normally ``~/.config/dune/config`` on Unix systems
and ``%LOCALAPPDATA%/dune/config`` on Windows. However, for most Dune commands,
it is possible to specify an alternative configuration file with the
``--config-file`` option. Command-line flags take precedence over the contents
of the ``config`` file. If ``--no-config`` or ``-p`` is passed, Dune will not
read this file.
The ``config`` file can contain the following stanzas:
.. toctree::
action_stdout_on_success
action_stderr_on_success
cache
cache_check_probability
cache_storage_mode
display
jobs
project_defaults
sandboxing_preference
terminal_persistence

View file

@ -0,0 +1,15 @@
jobs
----
Maximum number of concurrent jobs Dune is allowed to have.
.. code:: dune
(jobs <setting>)
where ``<setting>`` is one of:
- ``auto``, auto-detect maximum number of cores. This is the default value.
- ``<number>``, a positive integer specifying the maximum number of jobs Dune
may use simultaneously.

View file

@ -0,0 +1,53 @@
project_defaults
----------------
.. versionadded:: 3.17
Specify default values for stanzas ``authors``, ``maintainers``, and ``license``
of the :doc:`../dune-project/index` file when initializing a project with
``dune init proj``. The format of the 'project_defaults' stanza is as follows:
.. code:: dune
(project_defaults
<optional-fields>)
``<optional-fields>`` are:
.. describe:: (authors <string(s)>)
Specify authors.
Example:
.. code:: dune
(project_defaults
(authors
"Jane Doe <jane.doe@example.com>"
"John Doe <john.doe@example.com>"))
.. describe:: (maintainers <string(s)>)
Specify maintainers.
Example:
.. code:: dune
(project_defaults
(maintainers
"Jane Doe <jane.doe@example.com>"
"John Doe <john.doe@example.com>"))
.. describe:: (license <string(s)>)
Specify license, ideally as an identifier from the `SPDX License List
<https://spdx.org/licenses/>`__.
Example:
.. code:: dune
(project_defaults
(license "MIT"))

View file

@ -0,0 +1,19 @@
sandboxing_preference
---------------------
The preferred sandboxing setting. Individual rules may specify different
preferences. Dune will try to utilize a setting satisfying both conditions.
.. code:: dune
(sandboxing_preference <setting> <setting> ...)
where each ``<setting>`` can be one of:
- ``none`` disables sandboxing.
- ``hardlink`` uses hard links for sandboxing. This is the default under Linux.
- ``copy`` copies files for sandboxing. This is the default under Windows.
- ``symlink`` uses symbolic links for sandboxing.

View file

@ -0,0 +1,17 @@
terminal-persistence
--------------------
Specifies how Dune handles the terminal when a rebuild is triggered in watch mode.
.. code:: dune
(terminal-persistence <setting>)
where ``<setting>`` is one of:
- ``preserve`` does not clear the terminal screen between rebuilds.
- ``clear-on-rebuild`` clears the terminal screen between rebuilds.
- ``clear-on-rebuild-and-flush-history`` clears the terminal between rebuilds, and
it also deletes everything in the scrollback buffer.