0
on success.
Composable build system for ocaml
dune build
[--watch]
dune runtest
[--watch]
dune exec
NAME
dune utop
[DIR]
dune install
dune init
project
NAME
[PATH]
[--libs=l1,l2
--ppx=p1,p2
--inline-tests]
Dune is a build system designed for OCaml projects only. It focuses on providing the user with a consistent experience and takes care of most of the low-level details of OCaml compilation. All you have to do is provide a description of your project and Dune will do the rest.
The scheme it implements is inspired from the one used inside Jane Street and adapted to the open source world. It has matured over a long time and is used daily by hundreds of developers, which means that it is highly tested and productive.
|
An alias for |
|---|---|
|
An alias for promotion apply. |
|
An alias for |
build [OPTION]… [TARGET]…Build the given targets, or the default ones if none are given.
cache COMMAND …Manage Dune's shared cache of build artifacts.
clean [OPTION]… [PATH]…Clean the project.
describe [COMMAND] …Describe the workspace.
diagnostics [OPTION]…Fetch and return errors from the current build.
exec [OPTION]… PROG [ARGS]…Execute a command in a similar environment as if installation was performed.
external-lib-deps [OPTION]… [TARGET]…Moved to dune describe external-lib-deps.
fmt [OPTION]…Format source code.
format-dune-file [OPTION]… [FILE]Format dune files.
help [--build-info] [--man-format=FMT] [OPTION]… [TOPIC]Additional Dune help.
init COMMAND …Command group for initializing Dune components.
install [OPTION]… [PACKAGE]…Install packages defined in the workspace.
installed-libraries [OPTION]…Print out libraries installed on the system.
internal COMMAND …monitor [OPTION]…Connect to a Dune RPC server and monitor it.
ocaml COMMAND …Command group related to OCaml.
ocaml-merlin [OPTION]…Start a merlin configuration server.
package COMMAND …Experimental package management
pkg COMMAND …Experimental package management
promotion COMMAND …Control how changes are propagated back to source code.
rocq COMMAND …Command group related to Rocq.
rpc COMMAND …Dune's RPC mechanism. Experimental.
rules [OPTION]… [TARGET]…Dump rules.
runtest [OPTION]… [TEST]…Run tests.
show COMMAND …Command group for showing information about the workspace
shutdown [OPTION]…Cancel and shutdown any builds in the current workspace.
subst [--build-info] [OPTION]…Substitute watermarks in source files.
tools COMMAND …Command group for wrapped tools.
top [OPTION]… [DIR]Print a list of toplevel directives for including directories and loading cma files.
trace COMMAND …Commands to view dune's event trace
uninstall [OPTION]… [PACKAGE]…Uninstall packages defined in the workspace.
upgrade [OPTION]…Upgrade projects across major Dune versions.
utop [OPTION]… [DIR] [ARGS]…Load library in utop.
These options are common to all commands.
--help[=FMT] (default=auto)Show this help in format FMT. The value FMT must be one of auto, pager, groff or plain. With auto, the format is pager or plain whenever the TERM env var is dumb or undefined.
--version
Show version information.
Use `dune COMMAND --help' for help on a single command.
dune exits with:
0
on success.
1
if an error happened.
130
if it was interrupted by a signal.
These environment variables affect the execution of dune:
CLICOLOR
If different than 0, ANSI colors are supported and should be used when the program isn't piped. If equal to 0, don't output ANSI color escape codes
CLICOLOR_FORCE
If different than 0, ANSI colors should be enabled no matter what.
DUNE_CACHE_ROOT
If set, determines the location of all the different caches used by dune.
Initialise a new project named `foo':
dune init project foo
Build all targets in the current source tree:
dune build
Run the executable named `bar':
dune exec bar
Run all tests in the current source tree:
dune runtest
Install all components defined in the project:
dune install
Remove all build artefacts:
dune clean
10 releases since Debian 5.0 (Lenny); the text changed 6 times.
--version since Debian 10 (Buster).
--always-show-command-line until Debian 12 (Bookworm);
--auto-promote until Debian 12 (Bookworm);
--build-info until Debian 12 (Bookworm);
--config-file until Debian 12 (Bookworm);
--debug-artifact-substitution until Debian 12 (Bookworm);
--debug-backtraces until Debian 12 (Bookworm);
--debug-dependency-path until Debian 12 (Bookworm);
--debug-findlib until Debian 12 (Bookworm);
--default-target until Debian 10 (Buster);
--dev until Debian 10 (Buster);
--diff-command until Debian 12 (Bookworm);
--display until Debian 12 (Bookworm);
--for-release-of-packages until Debian 11 (Bullseye);
--force until Debian 12 (Bookworm);
--ignore-promoted-rules until Debian 12 (Bookworm);
--no-buffer until Debian 12 (Bookworm);
--no-config until Debian 12 (Bookworm);
--no-print-directory until Debian 12 (Bookworm);
--only-packages until Debian 12 (Bookworm);
--profile until Debian 10 (Buster);
--promote-install-files until Debian 11 (Bullseye);
--release until Debian 12 (Bookworm);
--root until Debian 12 (Bookworm);
--stats until Debian 10 (Buster);
--terminal-persistence until Debian 12 (Bookworm);
--trace-file until Debian 12 (Bookworm);
--verbose until Debian 12 (Bookworm);
--watch until Debian 12 (Bookworm);
--workspace until Debian 10 (Buster);
-f until Debian 12 (Bookworm);
-j until Debian 12 (Bookworm);
-p until Debian 11 (Bullseye);
-w until Debian 12 (Bookworm);
-x until Debian 12 (Bookworm).