digitalmars.D - Could DRuntime be implemented as a shared library?
- solidstate1991 (13/13) May 31 2017 Offloading at least the GC could enable the implementation of a
- rikki cattermole (8/22) May 31 2017 Won't work, TypeInfo doesn't cross the shared library boundary atm. This...
- solidstate1991 (4/11) May 31 2017 I knew that under Linux Phobos is a shared library, I didn't know
- Nicholas Wilson (3/15) May 31 2017 I'd suggest starting with Benjamin Thaut's DConf 2016 talk
- Jacob Carlborg (4/6) Jun 01 2017 Not on macOS.
Offloading at least the GC could enable the implementation of a per-application GC easier, as well as making development of shared libraries under Windows much easier, might even enable the offloading of Phobos into its own DLL. As an outsider, I think the biggest problem would be from the templates (if any) used in the runtime library on the implementation side. On the other hand we could just still implement those as a static library into the executable files. Versioning would be the hardest, we either release a new one with each new implementation, or develop the runtime library more independently from the compiler with clever versioning, however it might cause the development of the DRuntime to be fragmented for supporting older and newer versions.
May 31 2017
On 31/05/2017 4:57 PM, solidstate1991 wrote:Offloading at least the GC could enable the implementation of a per-application GC easier, as well as making development of shared libraries under Windows much easier, might even enable the offloading of Phobos into its own DLL.Won't work, TypeInfo doesn't cross the shared library boundary atm. This is probably the real blocker for shared libs on Windows (includes Phobos as a DLL). The GC can be swapped out already at runtime, just need shared libs to be working properly :)As an outsider, I think the biggest problem would be from the templates (if any) used in the runtime library on the implementation side. On the other hand we could just still implement those as a static library into the executable files. Versioning would be the hardest, we either release a new one with each new implementation, or develop the runtime library more independently from the compiler with clever versioning, however it might cause the development of the DRuntime to be fragmented for supporting older and newer versions.We already do all this, on Linux (and I think OSX too) Phobos+druntime is built as a shared library by default.
May 31 2017
Won't work, TypeInfo doesn't cross the shared library boundary atm. This is probably the real blocker for shared libs on Windows (includes Phobos as a DLL). The GC can be swapped out already at runtime, just need shared libs to be working properly :)Where can I read more about this TypeInfo issue? In July I'll have a bit more free time, maybe I can help with it.We already do all this, on Linux (and I think OSX too) Phobos+druntime is built as a shared library by default.I knew that under Linux Phobos is a shared library, I didn't know about the rest.
May 31 2017
On Wednesday, 31 May 2017 at 19:58:44 UTC, solidstate1991 wrote:I'd suggest starting with Benjamin Thaut's DConf 2016 talk https://www.youtube.com/watch?v=MQRHxI2SrYMWon't work, TypeInfo doesn't cross the shared library boundary atm. This is probably the real blocker for shared libs on Windows (includes Phobos as a DLL). The GC can be swapped out already at runtime, just need shared libs to be working properly :)Where can I read more about this TypeInfo issue? In July I'll have a bit more free time, maybe I can help with it.We already do all this, on Linux (and I think OSX too) Phobos+druntime is built as a shared library by default.I knew that under Linux Phobos is a shared library, I didn't know about the rest.
May 31 2017
On 2017-05-31 18:02, rikki cattermole wrote:We already do all this, on Linux (and I think OSX too) Phobos+druntime is built as a shared library by default.Not on macOS. -- /Jacob Carlborg
Jun 01 2017