[GSoC 2019] Interested in Baremetal D Runtime and project ideas

Stefanos Baziotis sdi1600105 at di.uoa.gr
Sat Apr 6 20:22:19 UTC 2019


On Saturday, 6 April 2019 at 19:48:42 UTC, Mike Franklin wrote:
> I'm sorry for responding late; I didn't see this thread until 
> just a short while ago.

No problem at all, I responded late as well.

> Basically, one needs to build an operating system into the D 
> runtime.
> In a way, that's pretty cool, as D itself would then come with 
> an operating system included, but is that really practical?

While that would be a very interesting hobby project, it
is as you say not very practical and most of all, it would
probably not help the community that much.

> As I see it, we actually have the vast majority of it already 
> implemented, but with all the dependencies on C, C++, operating 
> system APIs, and a design philosophy the operating system and 
> C/C++ toolchain would always be there from the beginning, we 
> have a tangled mess.
>

I totally agree with all of these. What I roughly got from the 
project
description was to achieve what Andrei said but without the 
dependencies to
so much existing C/C++ code.

> A great help will be if Dan Printzell succeeds in eliminating 
> the dependency of many runtime hooks on TypeInfo.  Since 
> TypeInfo is a class, his project will help eliminate the 
> dependency on classes, and since classes more-or-less require 
> the GC, it removes the dependency of those runtime hooks on the 
> GC as well. It will also decouple the compiler from the runtime 
> allowing it to generate code with fewer dependencies.
>

Actually Dan started on the Baremetal project at first (you 
probably
know that) and then moved to that project after discussion
in the forum. The fact that Dan works on that makes me doubly
excited to work on this. I think the result would much better than
simply -betterC with a couple more utilities.

> However, those runtime hooks still require implementations in 
> terms of memcpy, memcmp, malloc, free, etc.  Having those 
> written in D as strongly-typed templates would further reduce 
> dependencies on a C/C++ toolchain and standard library.  With 
> Dan's work completed, the benefits of having memcpy, malloc and 
> friends implemented in D would become much more apparent, as 
> the new runtime template lowerings could then be implemented in 
> D all the way down the stack utilizing CTFE, design by 
> introspection, and all of D's compiler guarantees such a safety 
> and purity.
>
> Finally, I think it would help greatly if we could detangle and 
> pull out those features of Phobos that don't require any 
> runtime support (e.g. std.traits, std.meta) that would provide 
> a base, lightweight, no-dependency utility library for all D 
> platforms including bare metal.
>
> Mike

Great proposals Mike. My answers might seem short but really you 
solved
most of my quetsions. So what do you believe is the best way I 
can help?

- Stefanos



More information about the Digitalmars-d mailing list