Blog post: using dynamic libraries in dub

Mike Wey mike-wey at example.com
Tue Dec 19 21:38:40 UTC 2017


On 19-12-17 18:58, Neia Neutuladh wrote:
>  From the "it's a hacky workaround but it's what we've got" department: 
> how to use dynamic libraries in dub, with GtkD as the example.
> 
> GtkD takes about 45MB on its own, and that means it can take a fair bit 
> of time to build anything that depends on it -- even if it only uses a 
> handful of symbols. Building it as a dynamic library can shrink compile 
> times significantly.
> 
> https://blog.ikeran.org/?p=323
> 
> An example of this strategy in use: 
> https://git.ikeran.org/dhasenan/resin-browser/src/master/dub.json

And for GtkD, that is why it would make sense to relay on the packages 
supplied by your distribution. And just list "gtkd-3" in the "libs" 
section. Avoiding the need for the workaround to build a shared version.

-- 
Mike Wey


More information about the Digitalmars-d-announce mailing list