dub can build library for dependencies

Petar Petar
Fri Jul 31 05:06:58 UTC 2020


On Thursday, 30 July 2020 at 12:04:18 UTC, zoujiaqing wrote:
> I want to rely on a library, but I don't want to compile it on 
> my computer. I hope dub can help us with this function.
>
> Just as I rely on a docker mirror, this docker mirror is not 
> built on my computer. This will increase my compilation time.
>
> Thanks.

I think the best way to address this problem is via something 
along the lines of https://cachix.org/.

The idea is that you create a Nix package (which declaratively 
describes the complete dependency graph of the thing you want to 
build) and then the first time the package is built it would be 
placed in a shared cache, which can be securely access by other 
developers. I am a Nix user and I haven't tried cachix yet, but 
from what I've seen many people use it successfully speed up both 
their local and CI builds. I think the Dub registry should host 
cachix-like server.
The first step in this direction would be to add the nix store as 
an alternative registry provider to dub.


More information about the Digitalmars-d mailing list