Build using D

Cogitri oss at cogitri.dev
Thu Apr 16 17:38:03 UTC 2020


On Thursday, 16 April 2020 at 17:11:39 UTC, NaN wrote:
> Why not actually use D as build system for D projects? I assume 
> DUB is written in D, but why not just have DUB features in a 
> library and use a D build script?
>
> rdmd build.d
>
> Is it a dumb idea?

Using a fully featured programming language for the build system 
usually leads to everyone doing things in a slightly different 
(and usually very brittle) way. See e.g. build.rs from the Rust 
world - you need different environment variables for each package 
to use system packages instead of using some random version the 
-sys package distributes, half of the packages don't even use 
pkg-config to detect native libs and just assume you have 
everything in the same spot as the distro the developer uses and 
generally everything is prone to breaking if you have a slightly 
different setup than the developers.
Really, I think it the less custom and "clever" a buildsystem is, 
the better.

Personally, I think it's best to just use dub or meson.


More information about the Digitalmars-d mailing list