Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
May 31, 2017 Could DRuntime be implemented as a shared library? | ||||
---|---|---|---|---|
| ||||
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 Re: Could DRuntime be implemented as a shared library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to solidstate1991 | 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 Re: Could DRuntime be implemented as a shared library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to rikki cattermole | > 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 Re: Could DRuntime be implemented as a shared library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to solidstate1991 | On Wednesday, 31 May 2017 at 19:58:44 UTC, solidstate1991 wrote: >> 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. I'd suggest starting with Benjamin Thaut's DConf 2016 talk https://www.youtube.com/watch?v=MQRHxI2SrYM |
June 01, 2017 Re: Could DRuntime be implemented as a shared library? | ||||
---|---|---|---|---|
| ||||
Posted in reply to rikki cattermole | 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 |
Copyright © 1999-2021 by the D Language Foundation