Man page - dune-init(1)
Packages contains this manual
- dune-describe(1)
- dune-install(1)
- dune-installed-libraries(1)
- dune-fmt(1)
- dune-format-dune-file(1)
- dune-ocaml-merlin(1)
- dune-help(1)
- dune-show(1)
- dune-top(1)
- dune-promote(1)
- dune-cache(1)
- dune-runtest(1)
- dune-package(1)
- dune-utop(1)
- dune-tools(1)
- dune-init(1)
- dune-config(5)
- dune-clean(1)
- dune-printenv(1)
- dune-external-lib-deps(1)
- dune-subst(1)
- dune-build(1)
- dune-shutdown(1)
- dune-rules(1)
- dune-diagnostics(1)
- dune-uninstall(1)
- dune-rpc(1)
- dune-coq(1)
- dune(1)
- dune-test(1)
- dune-promotion(1)
- dune-upgrade(1)
- dune-pkg(1)
- dune-internal(1)
- dune-monitor(1)
- dune-ocaml(1)
- dune-exec(1)
apt-get install ocaml-dune
Manual
DUNE-INIT
NAMESYNOPSIS
DESCRIPTION
COMMANDS
COMMON OPTIONS
EXIT STATUS
EXAMPLES
SEE ALSO
NAME
dune-init - Command group for initializing Dune components.
SYNOPSIS
dune init
proj NAME [PATH] [OPTION]...
dune init exec NAME [PATH] [OPTION]...
dune init lib NAME [PATH] [OPTION]...
dune init test NAME [PATH] [OPTION]...
DESCRIPTION
dune init COMPONENT NAME [PATH] [OPTION]... initializes a new dune configuration for a component of the kind specified by the subcommand COMPONENT , named NAME , with fields determined by the supplied OPTION s.
Run a subcommand with --help for for details on it's supported arguments
If the optional PATH is provided, it must be a path to a directory, and the component will be created there. Otherwise, it is created in a child of the current working directory, called NAME . To initialize a component in the current working directory, use ‘.‘ as the PATH .
Any prefix of a COMMAND 's name can be supplied in place of full name (as illustrated in the synopsis).
For more details, see https://dune.readthedocs.io/en/stable/usage.html#initializing-components
COMMANDS
executable [ OPTION ]… NAME [ PATH ]
A binary executable.
library [ OPTION ]… NAME [ PATH ]
An OCaml library.
project [ OPTION ]… NAME [ PATH ]
A project is a predefined composition of components arranged in a standard directory structure. The kind of project initialized is determined by the value of the --kind flag and defaults to an executable project, composed of a library, an executable, and a test component.
test [ OPTION ]… NAME [ PATH ]
A test harness. (For inline tests, use the --inline-tests flag along with the other component kinds.)
COMMON OPTIONS
--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.
EXIT STATUS
dune init exits with:
|
0 |
on success. |
|||
|
1 |
if an error happened. |
|||
|
130 |
if it was interrupted by a signal. |
EXAMPLES
|
1. |
Generate a project skeleton for an executable named ‘myproj' in a new directory named ‘myproj', depending on the bos library and using inline tests along with ppx_inline_test: |
dune init proj myproj --libs bos --ppx ppx_inline_test --inline-tests
|
2. |
Configure an executable component named ‘myexe' in a dune file in the current directory: |
dune init exe myexe
|
3. |
Configure a library component named ‘mylib' in a dune file in the ./src directory depending on the core and cmdliner libraries, the ppx_let and ppx_inline_test preprocessors, and declared as using inline tests: |
dune init lib mylib src --libs core,cmdliner --ppx ppx_let,ppx_inline_test --inline-tests
|
4. |
Configure a test component named ‘mytest' in a dune file in the ./test directory that depends on ‘mylib': |
dune init test mytest test --libs mylib
SEE ALSO
dune(1)