Thread overview
phobos runtime as a dll
Jun 20, 2005
Glen
Jun 20, 2005
James Dunne
Jun 21, 2005
Glen
June 20, 2005
I am using D for a command line toolset that has 50+ windows .exe files.  I want to cut down the size of the package by hpefull sharing the common D runtime stuff in a DLL.

Is there anyway to dynamically link in the phobos runtime as a .dll instead of statically linked in each .exe?

Also any guess on how much space that would save (my rough estimate is 80K per
exe)?

thanks,
Glen




June 20, 2005
In article <d96acb$oe8$1@digitaldaemon.com>, Glen says...
>
>I am using D for a command line toolset that has 50+ windows .exe files.  I want to cut down the size of the package by hpefull sharing the common D runtime stuff in a DLL.
>
>Is there anyway to dynamically link in the phobos runtime as a .dll instead of statically linked in each .exe?
>
>Also any guess on how much space that would save (my rough estimate is 80K per
>exe)?
>
>thanks,
>Glen
>

Might it be better to create a 'phobos launcher' utility to launch D programs and provide them with a phobos library implementation?  This would solve the GC problem and only use one GC instance in the launcher.

Regards,
James Dunne
June 21, 2005
Not really sure what you mean here.  Here is my criteria

- an all D solution is the ideal solution though tiny C stub launchers could work

- the exe has minimal size.  Said another way the entire package together is minimal in size

- individual exe's are needed


What would the Phobos launcher be written in?  If it is D with the Phobos runtime then it is still 88KB minimal.  I am hoping to get that down to 5K-10K and one or more shared DLL's (based on some basic tests with C code).

From reading the section on DLL's I am fairly certain you can share the GC between DLL instances...


In article <d96f11$rtd$1@digitaldaemon.com>, James Dunne says...
>
>In article <d96acb$oe8$1@digitaldaemon.com>, Glen says...
>>
>>I am using D for a command line toolset that has 50+ windows .exe files.  I want to cut down the size of the package by hpefull sharing the common D runtime stuff in a DLL.
>>
>>Is there anyway to dynamically link in the phobos runtime as a .dll instead of statically linked in each .exe?
>>
>>Also any guess on how much space that would save (my rough estimate is 80K per
>>exe)?
>>
>>thanks,
>>Glen
>>
>
>Might it be better to create a 'phobos launcher' utility to launch D programs and provide them with a phobos library implementation?  This would solve the GC problem and only use one GC instance in the launcher.
>
>Regards,
>James Dunne