Building custom library package with dub

Mike Parker via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Mar 18 06:41:12 PDT 2017


On Saturday, 18 March 2017 at 12:49:33 UTC, alex1974 wrote:

>
> This simple layout works, but then all parts will be compiled 
> every time. Is there a way to just compile the "sublibraries" 
> which have changed?

By "compiled every time", if you're talking about when using the 
library as a dependency, that's not quite true. dub will compile 
dependencies on the first run, then only in specific scenarios, 
not every time. It's really not a big deal. Take a look at dlib 
[1], for example. On big monolithic library and I haven't seen 
anyone complaining.

But if you really want to, take a look at subpackages[2] in the 
dub docs.

[1] https://github.com/gecko0307/dlib
[2] https://code.dlang.org/package-format?lang=json#sub-packages


More information about the Digitalmars-d-learn mailing list