Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DUNE-INIT(1)			   Dune Manual			    DUNE-INIT(1)

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 configu-
     ration  for  a component of the kind specified by the subcommand COMPONENT,
     named NAME, with fields determined by the supplied OPTIONs.

     Run a subcommand with  --help for for details on it's supported arguments

     If the optional PATH is provided, the component will be created there. Oth-
     erwise, it is created in the current working directory.

     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#ini-
     tializing-components

COMMANDS
     executable [OPTION]a| NAME [PATH]
	 A binary executable.

     library [OPTION]a| NAME [PATH]
	 An OCaml library.

     project [OPTION]a| NAME [PATH]
	 A project is a predefined composition of components arranged in a stan-
	 dard 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]a| 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
     init 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).

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)

Dune n/a							    DUNE-INIT(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=dune-init&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help