So one thing that almost every major middleware provides, is an interface to hook your own allocation and filesystem callbacks under the hood, to allow integration with your potentially complex technology.<div><br></div><div>
In my industry, memory and filesystem hooks are non-negotiable. We can't use any middleware that does not provide them.</div><div>Traditionally, we have a problem with the C library, and many core C libs which depend heavily on the CRT. Almost all games engines have to wastefully rewrite large portions of the CRT, just to implement the appropriate memory and filesystem interface, and some super handy common libs are lost to us due to lack of this foresight.</div>
<div><br></div><div>So this in mind, many of the goodies in phobos are currently unusable to us (although fortunately source is available).</div><div>Has it ever been considered to allow hooks into the backends of those systems which could be registered at runtime?</div>
<div>It would be simple to provide an API where you could register the filesystem primitives, which all standard libraries would then magically route through (huzzah!).</div><div>A primitive malloc/free hook would be nice to have too, that way we can direct memory to the appropriate locations, and keep mem stats along with the the rest of the system.</div>
<div>It's not uncommon to malloc the entire heap on boot, and implement our own heap management through our own API's. Obviously system functions would fail to allocate memory in this environment...</div><div><br>
</div><div>Having these hooks in phobos would also lift this burden off of library developers (usually only added on request with a few months turn around time, which is no good for project scheduling), and it would never prevent us access to those libraries where the developers never considered our use case.</div>