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

COMMON OPTIONS

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

MORE HELP

161       Use `dune COMMAND --help' for help on a single command.
162

ENVIRONMENT

164       These environment variables affect the execution of exec:
165
166       DUNE_BUILD_DIR
167           Specified build directory. _build if unspecified
168
169       DUNE_PROFILE
170           Build profile. dev if unspecified or release if -p is set.
171
172       DUNE_STORE_ORIG_SOURCE_DIR
173           Store original source location in dune-package metadata
174
175       DUNE_WORKSPACE
176           Use this specific workspace file instead of looking it up.
177

BUGS

179       Check bug reports at https://github.com/ocaml/dune/issues
180
181
182
183Dune n/a                                                          dune-exec(1)
Impressum