# dmd.main

Entry point for DMD console version.

#### Discussion

This modules defines the entry point (`main`) for DMD, as well as related utilities needed for arguments parsing, path manipulation, etc... This file is not shared with other compilers which use the DMD front-end.

#### Authors

Walter Bright

#### License

Boost License 1.0

Source: main.d

Documentation: https://dlang.org/phobos/dmd_main.html

Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/main.d

- `main`

  #### Declaration

  `int `main`(int `argc`, char** `argv`);`

  DMD's entry point, C `main`.

  #### Discussion

  Without `-lowmem`, we need to switch to the bump-pointer allocation scheme right from the start, before any module ctors are run, so we need this hook before druntime is initialized and `_Dmain` is called.

  #### Return Value

  Return code of the application

- `_Dmain`

  #### Declaration

  `int `_Dmain`(char[][]);`

  Manual D main (for druntime initialization), which forwards to `tryMain`.

  #### Return Value

  Return code of the application