D runtime as a DLL

Does anyone know if at least D runtime and Phobos for D 2 will be pre-built into the DLL, or at least ready to compile in this way? Currently, as I understand it, for export all relevant functions and / or classes should be marked as export. Could not find anything similar in current DMD sources. Thanks.

+7
windows dll runtime d
source share
1 answer

Currently, Phobos is available as a ready-made LIB file, which at compile time is statically linked to your executable.

This has some advantages for a DLL:

  • Deployment - you can always be sure that your executable has the appropriate runtime / gc / phobos - the one that was tested with your application. There is a new version of Fobos and D runtime every month, using a DLL in this case can lead to version problems.

disadvantages

  • The executable size is slightly larger (100 kb)
  • Each "unit" exe / dll has its own garbage collector.

Why are you exploring options for using DLLs for Phobos? What disadvantages have you seen when using LIB?

+6
source share

All Articles