www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - OS kernel in D?

reply Curious User <Curious_member pathlink.com> writes:
Is it possible to write an OS kernel in D without going through contortions
necessary to make the runtime standalone? Perhaps the GNU port of D with
-fstandalone and -nostdinc or whatever might do the job nicely. But how about
with DM's D compiler?
Apr 04 2006
parent pragma <pragma_member pathlink.com> writes:
In article <e0tqca$10lq$1 digitaldaemon.com>, Curious User says...
Is it possible to write an OS kernel in D without going through contortions
necessary to make the runtime standalone? Perhaps the GNU port of D with
-fstandalone and -nostdinc or whatever might do the job nicely. But how about
with DM's D compiler?

AFAIK, there's no direct path to getting either DMD or GDC to emit something resembling an OS kernel. As you allude to in your post, one would indeed have to go through contortions modifying the runtime. Phobos would have to be modified to support itself when working with memory, threads, mutexes, semaphores, devices, and so on. However, others have made the first steps toward a kernel written in the D langauge: http://www.prowiki.org/wiki4d/wiki.cgi?KernelWithD - EricAnderton at yahoo
Apr 04 2006