www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Doing kernel with D

reply Yassin <Yassin_member pathlink.com> writes:
Hi,

Actually i'm developping a small kernel in C++. and i think using 'D' would be
helpful so i'm seriously thinking to port the C++ code to D (Actually i've
implemented Interrupt/Exception handling, Slab allocator, Basic virtual mem
manager and a multilevel feedback sheduler).
What i'm looking for actually is:

- enabling langauge features. like string switch cases, dynamic arrays slicing,
runtime type identification
- enabling exception handling to integrate with  cpu exceptions.
- explicit memory management (possibly enabling gc in the user space)

my question is related to the Runtime helper functions used by the compiler to
implement those features ? i've looked at the ABI but the section is marked To
be Done. i've also started learning some phobos code especially the 'internal'
module (i guess this contains functions used by the compiler). but if anyone can
guide me it will be helpful (excuse my bad english).

i dont intend to use the entire phobos library (may be later)just the features i
need in the kernel code.
Apr 28 2006
parent reply Sean Kelly <sean f4.ca> writes:
Yassin wrote:
 
 i dont intend to use the entire phobos library (may be later)just the features
i
 need in the kernel code.
At the risk of being pedantic, you may want to check out Ares: http://www.dsource.org/projects/ares It may be a better starting point if you don't intend to use much Phobos code or if you think you may need to modify the internals for some reason. However, I should qualify this by saying that it hasn't been well tested on Linux yet and GDC support is waiting on the next GDC release. Finally, I suspect the Linux library in the current release may have link problems (someone mentioned this recently), but I will address this in the next release which will be in the next day or two (to match DMD 155). Sean
Apr 28 2006
parent Kyle Furlong <kylefurlong gmail.com> writes:
Sean Kelly wrote:
 Yassin wrote:
 i dont intend to use the entire phobos library (may be later)just the 
 features i
 need in the kernel code.
At the risk of being pedantic, you may want to check out Ares: http://www.dsource.org/projects/ares It may be a better starting point if you don't intend to use much Phobos code or if you think you may need to modify the internals for some reason. However, I should qualify this by saying that it hasn't been well tested on Linux yet and GDC support is waiting on the next GDC release. Finally, I suspect the Linux library in the current release may have link problems (someone mentioned this recently), but I will address this in the next release which will be in the next day or two (to match DMD 155). Sean
I can add here from personal experience, that Ares is much more user friendly for low level work.
Apr 28 2006