Installing DUB

To install DUB, search your operating system's package manager or download the pre-compiled package for your platform. The Windows installer will perform all installation steps; for other archives, you will want to ensure the DUB executable is in your path. Installation from source on other platforms is as simple as installing the dmd development files and your system's libcurl-dev, then running ./build.sh in the repository's folder.

DUB has created a "myproject" directory containing a .gitignore, a dub configuration file, and a source/app.d source tree.

Notice that there are two configuration file formats available. JSON is a commonly-known format, and SDL (SDLang) is a clean, minimalist format. Both offer equivalent functionality (though unlike JSON, SDLang allows comments); use whichever you prefer.

The DUB registry uses git tags to determine application versioning and DUB's dependency management is designed to work best according to SemVer rules. Please follow the rules of the SemVer specification for all packages you list on the registry. See the package documentation for more information on dependency version specification.

Building a third-party project

You can easily fetch and build third-party projects published to the dub registry via the dub fetch <package name> command.

To get the package, run dub fetch <package name> to download the package and install it in your user build directory. dub run <package name> can then be used to build and execute the package. dub fetch --cache=local <package name> will extract the package into a subfolder of your current working directory.