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 compute
31 Compute internal function.
32
33 exec
34 Execute a command in a similar environment as if installation was
35 performed.
36
37 external-lib-deps
38 Print out external libraries needed to build the given targets.
39
40 format-dune-file
41 Format dune files
42
43 help
44 Additional Dune help
45
46 install
47 Install packages.
48
49 installed-libraries
50 Print out libraries installed on the system.
51
52 printenv
53 Print the environment of a directory
54
55 promote
56 Promote files from the last run
57
58 rules
59 Dump internal rules.
60
61 runtest
62 Run tests.
63
64 subst
65 Substitute watermarks in source files.
66
67 uninstall
68 Uninstall packages.
69
70 upgrade
71 Upgrade jbuilder projects to dune
72
73 utop
74 Load library in utop
75
77 -f, --force
78 Force actions associated to aliases to be re-executed even if their
79 dependencies haven't changed.
80
81 --help[=FMT] (default=auto)
82 Show this help in format FMT. The value FMT must be one of `auto',
83 `pager', `groff' or `plain'. With `auto', the format is `pager` or
84 `plain' whenever the TERM env var is `dumb' or undefined.
85
86 --version
87 Show version information.
88
89 -w, --watch
90 Instead of terminating build after completion, wait continuously
91 for file changes.
92
94 These options are common to all commands.
95
96 --auto-promote
97 Automatically promote files. This is similar to running dune
98 promote after the build.
99
100 --build-dir=FILE (absent DUNE_BUILD_DIR env)
101 Specified build directory. _build if unspecified
102
103 --config-file=FILE
104 Load this configuration file instead of the default one.
105
106 --debug-backtraces
107 Always print exception backtraces.
108
109 --debug-dependency-path
110 In case of error, print the dependency path from the targets on the
111 command line to the rule that failed.
112
113 --debug-findlib
114 Debug the findlib sub-system.
115
116 --default-target=TARGET
117 Set the default target that when none is specified to dune build.
118 It defaults to @@default.
119
120 --dev
121 Same as --profile dev
122
123 --diff-command=VAL
124 Shell command to use to diff files. Use - to disable printing the
125 diff.
126
127 --display=MODE
128 Control the display mode of Dune. See dune-config(5) for more
129 details.
130
131 --ignore-promoted-rules
132 Ignore rules with (mode promote)
133
134 -j JOBS
135 Run no more than JOBS commands simultaneously.
136
137 --no-buffer
138 Do not buffer the output of commands executed by dune. By default
139 dune buffers the output of subcommands, in order to prevent
140 interleaving when multiple commands are executed in parallel.
141 However, this can be an issue when debugging long running tests.
142 With --no-buffer, commands have direct access to the terminal. Note
143 that as a result their output won't be captured in the log file.
144 You should use this option in conjunction with -j 1, to avoid
145 interleaving. Additionally you should use --verbose as well, to
146 make sure that commands are printed before they are being executed.
147
148 --no-config
149 Do not load the configuration file
150
151 --no-print-directory
152 Suppress "Entering directory" messages
153
154 --only-packages=PACKAGES
155 Ignore stanzas referring to a package that is not in PACKAGES.
156 PACKAGES is a comma-separated list of package names. Note that this
157 has the same effect as deleting the relevant stanzas from jbuild
158 files. It is mostly meant for releases. During development, it is
159 likely that what you want instead is to build a particular
160 <package>.install target.
161
162 -p PACKAGES, --for-release-of-packages=PACKAGES
163 Shorthand for --root . --only-packages PACKAGE
164 --ignore-promoted-rules --no-config --profile release. You must use
165 this option in your <package>.opam files, in order to build only
166 what's necessary when your project contains multiple packages as
167 well as getting reproducible builds.
168
169 --profile=VAL (absent DUNE_PROFILE env)
170 Select the build profile, for instance dev or release. The default
171 is dev.
172
173 --root=DIR
174 Use this directory as workspace root instead of guessing it. Note
175 that this option doesn't change the interpretation of targets given
176 on the command line. It is only intended for scripts.
177
178 --store-orig-source-dir (absent DUNE_STORE_ORIG_SOURCE_DIR env)
179 Store original source location in dune-package metadata
180
181 --trace-file=FILE
182 Output trace data in catapult format (compatible with
183 chrome://tracing)
184
185 --verbose
186 Same as --display verbose
187
188 --workspace=FILE
189 Use this specific workspace file instead of looking it up.
190
191 -x VAL
192 Cross-compile using this toolchain.
193
195 Use `dune COMMAND --help' for help on a single command.
196
198 These environment variables affect the execution of dune:
199
200 DUNE_BUILD_DIR
201 Specified build directory. _build if unspecified
202
203 DUNE_PROFILE
204 Build profile. dev if unspecified or release if -p is set.
205
206 DUNE_STORE_ORIG_SOURCE_DIR
207 Store original source location in dune-package metadata
208
210 Check bug reports at https://github.com/ocaml/dune/issues
211
212
213
214Dune 11VERSION11 dune(1)