Am 29.08.2014 09:04, schrieb akaDemik:

I have dub project with "targetType": "dynamicLibrary".
Is there an option that would specify the main executable for the dub run?

Thanks!

There are two main possibilities how to approach this within the DUB
ecosystem:

  • Create a separate configuration with "targetType": "executable"
    and place it before the library configuration. It will then be built by
    default, but the library configuration will still be used when the
    package is used as a dependency.
  • Create a separate executable package or a sub package, which has the
    library as a dependency, and run that.

If an application is to be run that is not based on the DUB ecosystem,
there is currently no built-in way to do that. One problem with this is
that there is currently no hook to make this work inside an IDE, which
would severely limit its use.