Mimimal runtime library
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Thu Apr 3 16:24:32 PDT 2008
Lukas Lädrach wrote:
> Hi everybody,
>
> I'm looking for the absolute minimal set of files in phobos i _need_ to run a full featured D application.
> This means that I don't want to have any unneeded functionality in these files, only the framework to make the language complete.
>
> For me, this would mean:
> - Object and Interface base
> - Type info
> - Exception handling
> - Startup system (ctor/dtor handling, __main, _main)
>
> Only as stubs
> - GC
> - System interface
> - Stdc lib
> - Thread
>
> Has someone an idea? Walter?
Tango has this stuff separated; you may want to take a look at
<http://www.dsource.org/projects/tango/browser/trunk>, especially
lib/compiler/* (and lib/gc/stub/gc.d for malloc/free 'GC', easily
modified if needed).
You'll probably also want at least part of lib/common/*. For example,
Exception.d includes some error handler functions called by
lib/compiler, and the definitions of the exception classes they throw.
I do think you missed a few items in your first list though. For
example: associative arrays, dynamic casting, array concatenation, and
64-bit math on 32-bit systems all need runtime support in order to
function properly.
Other than providing those as well, I think the only requirement this
doesn't fit is that the Thread in lib/common/Thread.d isn't a stub. That
should be easy enough to fix if you prefer a stub, though.
More information about the Digitalmars-d
mailing list