Code organization, dub, etc.

Joe jma at fc.com
Mon Mar 13 14:11:45 UTC 2023


On Monday, 13 March 2023 at 13:32:04 UTC, Mike Parker wrote:
> The package registry is full of libraries, yes. That's what 
> it's primarily for. There aren't a lot of executables uploaded 
> there because they're usually better distributed in other ways. 
> But plenty of people are using dub to build them.
>
> One way to handle multiple executables is to write a simple 
> script that makes multiple calls to dub with the configurations 
> you need.

That's essentially the same as using a Makefile (or CMake with 
custom commands) to build your project.

What I had in mind when I mentioned "multi-executable projects" 
was something like Postgres or say, a tenth of that, e.g., a 
server executable, two or more client and utility executables and 
one or more libraries, all of it spread over a few directories, 
possibly to a depth of say, two from the root.  Can dub handle 
something like that, e.g., can it handle nested dub.json's, or 
wouldn't it make much more sense to build such a thing with make, 
cmake, meson?


More information about the Digitalmars-d-learn mailing list