February 24, 2020
In Rust they have $cargo new --lib

Even if dub doesn't have this, how can I change dub.json to build it as a library and not look for the main function?
February 24, 2020
On Monday, 24 February 2020 at 06:02:00 UTC, Adnan wrote:
> how can I change dub.json to build it as a library and not look for the main function?

The targetType setting determines how a project is build. It defaults to autodetect, which attempts to create an executable if there's a file at source/app.d. To create a library, either set the targetType setting to library explicitly, or make sure there are no files that trigger an application build.

See the dub documentation for a complete list of files that trigger an application build on autodetect.

https://dub.pm/package-format-json.html#configurations
https://dub.pm/package-format-json.html#target-types