Creating a dub library package that also comes with an executable

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 18 09:51:41 PDT 2017


Might be interesting for more people.

Just added a recipe to our dub cookbook (yes that exists).

[Creating a library package that also comes with an 
executable](https://github.com/dlang/dub/wiki/Cookbook#creating-a-library-package-that-also-comes-with-an-executable)

Seems like quite a lot of people keep (ab)using much more 
complicated subpackages for that.
https://github.com/dlang/dub/issues/1155

Subpackages are intended to modularize your package for the 
outside, e.g. to only link against vibe-d:data 
(http://code.dlang.org/packages/vibe-d%3Adata), while keeping all 
of them in a single repo.

Configurations are intended to offer different flavors of the 
same source code and work great to offer executable and library 
targets.


More information about the Digitalmars-d mailing list