Package manager for D packages
To use this package, run the following command in your project's root directory:
Package and build manager for D applications and libraries.
DUB emerged as a more general replacement for vibe.d's package manager. It does not imply a dependecy to vibe.d for packages and was extended to not only directly build projects, but also to generate project files (currently VisualD). Mono-D also support the use of dub.json (dub's package description) as project file.
The project's philosophy is to keep things as simple as possible. All that is needed to make a project a dub package is to write a short dub.json file and put the source code into a
source subfolder. It can then be registered on the public package registry to be made available for everyone. Any dependencies specified in
dub.json are automatically downloaded and made available to the project during the build process.
- Simple package and build description not getting in your way
- Integrated with Git, avoiding maintainance tasks such as incrementing version numbers or uploading new project releases
- Generates VisualD project/solution files, integrated into MonoD
- Support for DMD, GDC and LDC (common DMD flags are translated automatically)
- Supports development workflows by optionally using local directories as a package source
To make things as flexible as they need to be for certain projects, it is planned to gradually add more options to the package file format and eventually to add the possibility to specify an external build tool along with the path of it's output files. The idea is that DUB provides a convenient build management that suffices for 99% of projects, but is also usable as a bare package manager that doesn't get in your way if needed.
DUB comes precompiled for Windows, OS X and Linux. It needs to have libcurl with SSL support installed (except on Windows).
dub executable then just needs to be accessible from
PATH and can be invoked from the root folder of any DUB enabled project to build and run it.
If you want to build for yourself, just install DMD and libcurl development headers and run
./build.sh. On Windows you can simply run
build.cmd without installing anything besides DMD.
Михаил Страшун (Dicebot) maintains a dub package of the latest release in
Community, for x86_64 and i686.
Moritz Maxeiner has created a PKGBUILD file for GIT master: https://aur.archlinux.org/packages/dub-git/
Jordi Sayol maintains a DEB package as part of his D APT repository. Run
sudo apt-get install dub to install.
Chris Molozian has added DUB to Homebrew. Use
brew install dub or
brew install dub --HEAD to install the stable or the git HEAD version respectively.
Daniel Jost maintains a dub package on chocolatey. Use
cinst dub or
cinst dub -version #.#.# to install stable or a custom version respectively.
Using DUB as a library
The DUB package of DUB can be used as a library to load or manipulate packages, or to resemble any functionality of the command line tool. The former task can be achieved by using the Package class. For examples on how to replicate the command line functionality, see commandline.d.
- Registered by Sönke Ludwig
- 0.9.24-rc.2 released 4 years ago
- Copyright © 2012-2014 rejectedsoftware e.K., Copyright © 2012-2014 Matthias Dondorff
1.17.0-beta.1 2019-Aug-09 1.16.0 2019-Jul-02 1.16.0-rc.1 2019-Jun-27 1.16.0-beta.2 2019-Jun-24 1.16.0-beta.1 2019-Jun-16
- Download Stats:
15 downloads today
2424 downloads this week
7181 downloads this month
448770 downloads total
- Short URL: