1dune(1) Dune Manual dune(1)
2
3
4
6 dune - composable build system for OCaml
7
9 dune COMMAND ...
10
12 Dune is a build system designed for OCaml projects only. It focuses on
13 providing the user with a consistent experience and takes care of most
14 of the low-level details of OCaml compilation. All you have to do is
15 provide a description of your project and Dune will do the rest.
16
17 The scheme it implements is inspired from the one used inside Jane
18 Street and adapted to the open source world. It has matured over a long
19 time and is used daily by hundreds of developers, which means that it
20 is highly tested and productive.
21
23 build
24 Build the given targets, or all installable targets if none are
25 given.
26
27 clean
28 Clean the project.
29
30 exec
31 Execute a command in a similar environment as if installation was
32 performed.
33
34 external-lib-deps
35 Print out external libraries needed to build the given targets.
36
37 help
38 Additional Dune help
39
40 install
41 Install packages using opam-installer.
42
43 installed-libraries
44 Print out libraries installed on the system.
45
46 printenv
47 Print the environment of a directory
48
49 promote
50 Promote files from the last run
51
52 rules
53 Dump internal rules.
54
55 runtest
56 Run tests.
57
58 subst
59 Substitute watermarks in source files.
60
61 uninstall
62 Uninstall packages using opam-installer.
63
64 utop
65 Load library in utop
66
68 -f, --force
69 Force actions associated to aliases to be re-executed even if their
70 dependencies haven't changed.
71
72 --help[=FMT] (default=auto)
73 Show this help in format FMT. The value FMT must be one of `auto',
74 `pager', `groff' or `plain'. With `auto', the format is `pager` or
75 `plain' whenever the TERM env var is `dumb' or undefined.
76
77 --version
78 Show version information.
79
81 These options are common to all commands.
82
83 --auto-promote
84 Automatically promote files. This is similar to running dune
85 promote after the build.
86
87 --build-dir=FILE (absent DUNE_BUILD_DIR env)
88 Specified build directory. _build if unspecified
89
90 --config-file=FILE
91 Load this configuration file instead of the default one.
92
93 --debug-backtraces
94 Always print exception backtraces.
95
96 --debug-dependency-path
97 In case of error, print the dependency path from the targets on the
98 command line to the rule that failed.
99
100 --debug-findlib
101 Debug the findlib sub-system.
102
103 --default-target=TARGET
104 Set the default target that when none is specified to dune build.
105 It defaults to @@default.
106
107 --dev
108 Same as --profile dev
109
110 --diff-command=VAL
111 Shell command to use to diff files
112
113 --display=MODE
114 Control the display mode of Dune. See dune-config(5) for more
115 details.
116
117 --ignore-promoted-rules
118 Ignore rules with (mode promote)
119
120 -j JOBS
121 Run no more than JOBS commands simultaneously.
122
123 --no-buffer
124 Do not buffer the output of commands executed by dune. By default
125 dune buffers the output of subcommands, in order to prevent
126 interleaving when multiple commands are executed in parallel.
127 However, this can be an issue when debugging long running tests.
128 With --no-buffer, commands have direct access to the terminal. Note
129 that as a result their output won't be captured in the log file.
130 You should use this option in conjunction with -j 1, to avoid
131 interleaving. Additionally you should use --verbose as well, to
132 make sure that commands are printed before they are being executed.
133
134 --no-config
135 Do not load the configuration file
136
137 --only-packages=PACKAGES
138 Ignore stanzas referring to a package that is not in PACKAGES.
139 PACKAGES is a comma-separated list of package names. Note that this
140 has the same effect as deleting the relevant stanzas from jbuild
141 files. It is mostly meant for releases. During development, it is
142 likely that what you want instead is to build a particular
143 <package>.install target.
144
145 -p PACKAGES, --for-release-of-packages=PACKAGES
146 Shorthand for --root . --only-packages PACKAGE --promote ignore
147 --no-config --profile release. You must use this option in your
148 <package>.opam files, in order to build only what's necessary when
149 your project contains multiple packages as well as getting
150 reproducible builds.
151
152 --profile=VAL
153 Select the build profile, for instance dev or release. The default
154 is dev.
155
156 --root=DIR
157 Use this directory as workspace root instead of guessing it. Note
158 that this option doesn't change the interpretation of targets given
159 on the command line. It is only intended for scripts.
160
161 --verbose
162 Same as --display verbose
163
164 --workspace=FILE
165 Use this specific workspace file instead of looking it up.
166
167 -x VAL
168 Cross-compile using this toolchain.
169
171 Use `dune COMMAND --help' for help on a single command.
172
174 These environment variables affect the execution of dune:
175
176 DUNE_BUILD_DIR
177 Specified build directory. _build if unspecified
178
180 Check bug reports at https://github.com/ocaml/dune/issues
181
182
183
184Dune 11VERSION11 dune(1)