dune - 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.
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 [OPTION]â¦
Clean the project.
coq COMMAND â¦
Command group related to Coq.
describe [OPTION]⦠[STRING]â¦
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]â¦
Removed command.
fmt [OPTION]â¦
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]â¦
Install packages.
installed-libraries [OPTION]â¦
Print out libraries installed on the system.
internal COMMAND
â¦
ocaml COMMAND â¦
ocaml-merlin [OPTION]â¦
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]â¦
Run tests.
shutdown [OPTION]â¦
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]â¦
Uninstall packages.
upgrade [OPTION]â¦
Upgrade jbuilder projects to dune
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 the following status:
0 |
on success. |
|||
123 |
on indiscriminate errors reported on standard error. |
|||
124 |
on command line parsing errors. |
|||
125 |
on unexpected internal errors (bugs). |
Check bug reports at https://github.com/ocaml/dune/issues
1. |
Initialise a new project named ‘foo': |
dune init project foo
2. |
Build all targets in the current source tree: |
dune build
3. |
Run the executable named ‘bar': |
dune exec bar
4. |
Run all tests in the current source tree: |
dune runtest
5. |
Install all components defined in the project: |
dune install
6. |
Remove all build artefacts: |
dune clean