• Stars
    star
    669
  • Rank 66,976 (Top 2 %)
  • Language
    D
  • License
    MIT License
  • Created almost 12 years ago
  • Updated 26 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Package and build management system for D

dub package manager

Package and build manager for D applications and libraries.

There is a central package registry located at http://code.dlang.org.

GitHub tag Coverage Status Buildkite

Introduction

DUB emerged as a more general replacement for vibe.d's package manager. It does not imply a dependency 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 supports the use of dub.json (dub's package description) as the 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.

Key features

  • Simple package and build description not getting in your way
  • Integrated with Git, avoiding maintenance 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

Future direction

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.

Installation

DUB comes precompiled for Windows, OS X and Linux. It needs to have libcurl with SSL support installed (except on Windows).

The 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 a D compiler such as DMD and libcurl development headers and run ./build.d.

Arch Linux

Михаил Страшун (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/

Debian/Ubuntu Linux

Jordi Sayol maintains a DEB package as part of his D APT repository. Run sudo apt-get install dub to install.

OS X

Chris Molozian has added DUB to Homebrew. Use brew install dub to install the stable version, optionally adding --HEAD/--devel to install the latest git master or development release respectively.

There is also a MacPorts package available. Type sudo port install dub to install the latest stable version.

Windows

Daniel Jost maintains a dub package on chocolatey. Use cinst dub or cinst dub -version #.#.# to install stable or a custom version respectively.

Alpine Linux

Mathias (@Geod24) Lang maintains the Alpine Linux packages. It is currently part of 'edge' and can be installed through apk --no-cache add -X http://dl-cdn.alpinelinux.org/alpine/edge/testing dub.

OpenBSD

Brian Callahan (bcallah@) maintains the OpenBSD package. Use pkg_add dub to install it.

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.

Minimal D compiler required to build DUB

In general it is always recommended to build DUB with the latest version of your D compiler. However, currently 2.076 is required to build DUB from source.

Contributing

New contributers are always welcome, there's plenty to work on! For an easy start, take a look at issues marked bootcamp The contributing guidelines can be found here

More Repositories

1

dmd

dmd D Programming Language compiler
D
2,945
star
2

phobos

The standard library of the D programming language
D
1,179
star
3

druntime

Low level runtime library for the D programming language
D
655
star
4

dlang.org

Pages for the dlang.org website, home of the D Programming Language
D
345
star
5

visuald

Visual D - Visual Studio extension for the D programming language
D
288
star
6

tools

Ancillary tools for the D programming language compiler
D
199
star
7

DIPs

D Improvement Proposals
D
157
star
8

installer

dmd installers for various systems
Shell
82
star
9

dub-registry

Online registry for dub packages
D
82
star
10

ddox

Advanced D documentation engine
HTML
62
star
11

project-ideas

Collection of impactful projects in the D ecosystem
36
star
12

undeaD

Need an obsolete Phobos module? Here they are, back from the dead and upgraded to work with the latest D
D
29
star
13

dconf.org

D Conference website
HTML
28
star
14

dlang-bot

dlang-bot for automated bugzilla, github, and trello references
D
22
star
15

dub-docs

Documentation for the Dub package manager
Shell
16
star
16

vision-document

The high-level goals, current focus, future plans, and wishlist for the D Programming Language.
16
star
17

ci

dlang CI testing pipelines
Shell
13
star
18

downloads.dlang.org

Tools to manage downloads.dlang.org
Shell
8
star
19

PhobosV3-Design

6
star
20

ecotasks

Ecosystem Task List
4
star
21

research

Contains academic research documents, such as reports, papers, presentations etc.
3
star
22

docarchives.dlang.io

Versioned archives of dlang.org
3
star
23

D-Blog-Theme

WordPress theme for dlang.org/blog
CSS
3
star
24

stdcpp

Bindings for core components of the C++ standard library
D
3
star
25

.github

Organization-wide settings
1
star