What are the barriers to adding C support to dub?

Eugen Wissner belka at caraus.de
Fri Mar 19 23:30:10 UTC 2021


I think it just isn't dub's responsibility to build C code and it adds a
lot of complexity that is difficult to maintain. dub is more of a package
manager with some build system capabilities than a build system. If you look
at how many C/C++ build systems we have, autotools, cmake, meson, you
can see that it isn't a trivial task to get it right. And dub has even
problems with its main task, package management, so there where some
attempts to rewrite it from scratch.

In my opinion it would be better to add D support to existing build
systems. Meson supported D, there were cmake intergration for D.

On Sat Mar 20, 2021 at 12:11 AM CET, Chris Piker via Digitalmars-d wrote:
> I am curious to know what barriers prevent dub from supporting C
> source code compilation.
>
> I have seen many wrapper projects mentioned here, but I think all
> of these leave handling of external fortran/C/C++ source packages
> to other systems. This makes sense for large projects such as
> Qt. However, for new D programmers, original C sources may
> slowly disappear over time while continuing to supply key
> functionality for quite a while and I presume that getting new
> programmers is a central goal of the community.
>
> Since dub already works with compilers other than dmd, how much
> work would it take to make it work with other llvm/gcc supported
> languages such as fortran/c/c++ ?
>
> Are there fundamental non-technical reasons that support for
> selected external languages in dub is a bad idea?
>
> Maybe these are naive questions.
>
> I found dub to be especially handy in the wild-west environment
> of Windows programming and would like to rely on it a bit more.
>
> Kind Regards,




More information about the Digitalmars-d mailing list