1dune-exec(1)                      Dune Manual                     dune-exec(1)
2
3
4

NAME

6       dune-exec - Execute a command in a similar environment as if
7       installation was performed.
8

SYNOPSIS

10       dune exec [OPTION]... PROG [ARGS]...
11

DESCRIPTION

13       dune exec -- COMMAND should behave in the same way as if you do:
14
15         $ dune install
16         $ COMMAND
17
18       In particular if you run dune exec ocaml, you will have access to the
19       libraries defined in the workspace using your usual directives
20       (#require for instance)
21
22       When a leading / is present in the command (absolute path), then the
23       path is interpreted as an absolute path
24
25       When a / is present at any other position (relative path), then the
26       path is interpreted as relative to the build context + current working
27       directory (or the value of --root when ran outside of the project root)
28

OPTIONS

30       --context=CONTEXT (absent=default)
31           Run the command in this build context.
32
33       -f, --force
34           Force actions associated to aliases to be re-executed even if their
35           dependencies haven't changed.
36
37       --help[=FMT] (default=auto)
38           Show this help in format FMT. The value FMT must be one of `auto',
39           `pager', `groff' or `plain'. With `auto', the format is `pager` or
40           `plain' whenever the TERM env var is `dumb' or undefined.
41
42       --no-build
43           don't rebuild target before executing
44
45       --version
46           Show version information.
47
48       -w, --watch
49           Instead of terminating build after completion, wait continuously
50           for file changes.
51

COMMON OPTIONS

53       These options are common to all commands.
54
55       --auto-promote
56           Automatically promote files. This is similar to running dune
57           promote after the build.
58
59       --build-dir=FILE (absent DUNE_BUILD_DIR env)
60           Specified build directory. _build if unspecified
61
62       --config-file=FILE
63           Load this configuration file instead of the default one.
64
65       --debug-backtraces
66           Always print exception backtraces.
67
68       --debug-dependency-path
69           In case of error, print the dependency path from the targets on the
70           command line to the rule that failed.
71
72       --debug-findlib
73           Debug the findlib sub-system.
74
75       --default-target=TARGET
76           Set the default target that when none is specified to dune build.
77           It defaults to @@default.
78
79       --dev
80           Same as --profile dev
81
82       --diff-command=VAL
83           Shell command to use to diff files. Use - to disable printing the
84           diff.
85
86       --display=MODE
87           Control the display mode of Dune. See dune-config(5) for more
88           details.
89
90       --ignore-promoted-rules
91           Ignore rules with (mode promote)
92
93       -j JOBS
94           Run no more than JOBS commands simultaneously.
95
96       --no-buffer
97           Do not buffer the output of commands executed by dune. By default
98           dune buffers the output of subcommands, in order to prevent
99           interleaving when multiple commands are executed in parallel.
100           However, this can be an issue when debugging long running tests.
101           With --no-buffer, commands have direct access to the terminal. Note
102           that as a result their output won't be captured in the log file.
103           You should use this option in conjunction with -j 1, to avoid
104           interleaving. Additionally you should use --verbose as well, to
105           make sure that commands are printed before they are being executed.
106
107       --no-config
108           Do not load the configuration file
109
110       --no-print-directory
111           Suppress "Entering directory" messages
112
113       --only-packages=PACKAGES
114           Ignore stanzas referring to a package that is not in PACKAGES.
115           PACKAGES is a comma-separated list of package names. Note that this
116           has the same effect as deleting the relevant stanzas from jbuild
117           files. It is mostly meant for releases. During development, it is
118           likely that what you want instead is to build a particular
119           <package>.install target.
120
121       -p PACKAGES, --for-release-of-packages=PACKAGES
122           Shorthand for --root . --only-packages PACKAGE
123           --ignore-promoted-rules --no-config --profile release. You must use
124           this option in your <package>.opam files, in order to build only
125           what's necessary when your project contains multiple packages as
126           well as getting reproducible builds.
127
128       --profile=VAL (absent DUNE_PROFILE env)
129           Select the build profile, for instance dev or release. The default
130           is dev.
131
132       --root=DIR
133           Use this directory as workspace root instead of guessing it. Note
134           that this option doesn't change the interpretation of targets given
135           on the command line. It is only intended for scripts.
136
137       --store-orig-source-dir (absent DUNE_STORE_ORIG_SOURCE_DIR env)
138           Store original source location in dune-package metadata
139
140       --trace-file=FILE
141           Output trace data in catapult format (compatible with
142           chrome://tracing)
143
144       --verbose
145           Same as --display verbose
146
147       --workspace=FILE
148           Use this specific workspace file instead of looking it up.
149
150       -x VAL
151           Cross-compile using this toolchain.
152

MORE HELP

154       Use `dune COMMAND --help' for help on a single command.
155

ENVIRONMENT

157       These environment variables affect the execution of exec:
158
159       DUNE_BUILD_DIR
160           Specified build directory. _build if unspecified
161
162       DUNE_PROFILE
163           Build profile. dev if unspecified or release if -p is set.
164
165       DUNE_STORE_ORIG_SOURCE_DIR
166           Store original source location in dune-package metadata
167

BUGS

169       Check bug reports at https://github.com/ocaml/dune/issues
170
171
172
173Dune 11VERSION11                                                  dune-exec(1)
Impressum