dune-config(5)

πŸ“¦
version 3.24.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– dune-config β€” configuring the dune build system πŸ’–

okay bestie, so this is the dune-config(5) page from the Dune manual, and it's literally all about how you tell Dune what vibe to build in. let's get into it 🫢


✨ SYNOPSIS ✨

~/.config/dune/config

🌸 DESCRIPTION 🌸

so here's the tea: unless you pass --no-config or -p, Dune is gonna go read a configuration file from your user home directory. that file is how you control a whole bunch of different aspects of how Dune behaves. she's customizable like that πŸ’…

the config file normally lives at ~/.config/dune/config on Unix systems, and at Local Settings/dune/config inside the User home directory on Windows. but ngl, you can point her at a different config file entirely with the --config-file option. main character choice, honestly.

the very 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. no skipping this, it's giving mandatory βœ‹

the rest of the file has to be written in S-expression syntax and be composed of a list of stanzas. the sections below break down all the stanzas you've got available. periodt.


πŸŽ€ 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. that's it, that's the whole vibe check. πŸ’–


🌈 DISPLAY MODES 🌈

Syntax: (display MODE)

this stanza controls how Dune reports what it's doing to you, the user. you can also set this from the command line via --display MODE, so pick your fighter. the following display modes are available:

  • progress β€” this is the default! Dune shows and update a status line as build goals are being completed. iconic.
  • quiet β€” only display errors. minimalism, but make it stressed.
  • short β€” 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.
  • verbose β€” print the full command lines of programs being executed by Dune, with some colors to help differentiate programs.
heads up bestie: when the selected display mode is progress and the output is not a terminal, then the quiet mode is selected instead. plot twist!

that rule doesn't apply when running Dune inside Emacs, though. Dune detects whether it is executed from inside Emacs or not by looking at the environment variable INSIDE_EMACS that is set by Emacs. so if you want the same behavior with another editor, you can set this variable yourself. and if your editor already sets another variable, please open a ticket on the ocaml/dune GitHub project so that support for it can be added. they're literally asking, so go off πŸ›


πŸ’… JOBS πŸ’…

Syntax: (jobs NUMBER)

set the maximum number of jobs Dune might run in parallel. you can also set this from the command line via -j NUMBER. multitasking queen πŸ‘‘

the default for this value is the number of processors.


πŸ¦‹ 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. yes, you have to go read another manpage, i don't make the rules πŸ™ˆ


πŸ’€ BUGS πŸ’€

found something cursed? check bug reports at <https://github.com/ocaml/dune/issues>. fr fr, that's where the receipts live.


and that's the whole page, bestie πŸ’œ this was the Dune manual's dune-config(5) β€” written by Dune themselves. go configure something cute βœ¨πŸŽ€πŸŒΈ

πŸ“¦ where this page comes from