dud: A dub replacement

Russel Winder russel at winder.org.uk
Tue Nov 19 11:16:04 UTC 2019


On Mon, 2019-11-18 at 20:19 +0000, Tobias Pankrath via Digitalmars-d-announce
wrote:
> On Monday, 18 November 2019 at 19:54:38 UTC, Russel Winder wrote:
> 
> > Probably yes. Though Cargo has taken many different decisions 
> > to Dub and mostly I think Cargo took better decisions.
> 
> Could you elaborate a bit, please? I am not familiar with Cargo 
> though.

The single biggest difference for me just now is management of compilation
products.

In an attempt to share compiled products between projects, Dub keeps all
downloaded package source and compilations products of that source in a
central location. This ends up with a very complicated, and more or less
unusable except by Dub, store of compilation products – especially as the easy
to get to compilation product has unknown compilation details. Also it assumes
you have infinite amounts of disc space.

Cargo keeps the downloaded package sources centrally, but leaves all
compilation products in the project build area. This makes it easy to manage
and the compilation details of the compilation products are easy to
understand. OK you still have to manually manage the central repository but as
it is source only, you get a much smaller growth to infinite disc space
requirement.

As for smaller issues:

I prefer TOML over SDL as project specification notation (JSON is not an
option for me).

The convention over configuration rules for projects with multiple compilation
products is nicer in Cargo compared to Dub.

Cargo is far more accepted in Rust circles than Dub is in D circles. The issue
is not that this is true, but why is it true: is it just that D folk are still
obsessed with Make, SCons, CMake, Meson, etc. where Rust folk have never even
considered them.

D is still working with the ancient philosophy of the distributed standard
library provides everything, cf. Python and "batteries included". Python has
long ago had to give up on this and open its arms to PyPI based package
distribution.  Go and Rust never went with the "batteries included" but put
the infrastructure in place at the outset for supporting libraries from
repositories – Rust/Cargo handles this far better than Go. The upshot is that
the D package repository is still not really central to D code development.
And using Git, Breezy, Mercurial, etc. repositories is just not as simple and
straightforward as it is with Go and Rust/Cargo.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20191119/1b2c27b4/attachment.sig>


More information about the Digitalmars-d-announce mailing list