dune - composable build system for OCaml
dune runtest [--watch]
dune exec NAME
dune utop [DIR]
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.
test [OPTION]â¦ [DIR]â¦
An alias for runtest.
build [OPTION]â¦ [TARGET]â¦
Build the given targets, or all installable targets if none are given.
cache [--size=BYTES] [--trimmed-size=BYTES] [OPTION]â¦ [ACTION]
Manage the shared cache of build artifacts
Clean the project.
coq COMMAND â¦
Command group related to Coq.
describe [OPTION]â¦ [STRING]â¦
Describe the workspace.
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]â¦
Format source code.
format-dune-file [--dune-version=VERSION] [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]â¦
Print out libraries installed on the system.
ocaml COMMAND â¦
Start a merlin configuration server
printenv [OPTION]â¦ [PATH]
Print the environment of a directory
promote [OPTION]â¦ [FILE]â¦
Promote files from the last run
rpc COMMAND â¦
Dune's RPC mechanism. Experimental.
rules [OPTION]â¦ [TARGET]â¦
Dump internal rules.
runtest [OPTION]â¦ [DIR]â¦
cancel and shutdown any builds in the current workspace
subst [--build-info] [OPTION]â¦
Substitute watermarks in source files.
top [OPTION]â¦ [DIR]
Print a list of toplevel directives for including directories and loading cma files.
uninstall [OPTION]â¦ [PACKAGE]â¦
Upgrade jbuilder projects to dune
utop [OPTION]â¦ [DIR] [ARGS]â¦
Load library in utop
are common to all commands.
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.
Show version information.
Use ‘dune COMMAND --help' for help on a single command.
dune exits with the following status:
on indiscriminate errors reported on standard error.
on command line parsing errors.
on unexpected internal errors (bugs).
Check bug reports at https://github.com/ocaml/dune/issues
Initialise a new project named ‘foo':
dune init project foo
Build all targets in the current source tree:
Run the executable named ‘bar':
dune exec bar
Run all tests in the current source tree:
Install all components defined in the project:
Remove all build artefacts: