[Dlang-internal] A Proof of Concept for the baremetal D runtime plans

Mike Franklin slavo5150 at yahoo.com
Fri May 3 23:31:22 UTC 2019


On Friday, 3 May 2019 at 23:20:13 UTC, mbalantz wrote:

> * The linker errors complain about undefined symbols and 
> mention alphanumeric strings as reference, containing the SDL 
> binding for D keywords and SDL keywords as per the functions 
> that used them in the pongd.d file.

I'm sorry, but I don't fully understand.  Please copy and paste a 
few of the errors here.

> * I downloaded and installed the dmd compiler on x86_64 Windows 
> 10 Education on an AMD Ryzen 1950X. Therefore:

I think DMD is fine if you want to do bare-metal programming on 
x86_64.

> * ..it is not truly baremetal. I intended to share it to show a 
> demo, and then maybe we could look into reverse engineering it 
> to be baremetal. Though I don't know if I picked a good demo 
> for running baremetal (i.e. a pong game).

What I'm able to ascertain from this is that you've ported a pong 
game to SDL, not to bare metal.  If SDL were ported to bare 
metal, then it would probably work because SDL abstracts the 
architecture and platform for you.

> * Yes, it is quite dependent on SDL. Porting SDL to D would be 
> no small task, I would think? I tried using the bindbc bindings 
> provided in D's library to provide the SDL. Though that is not 
> sufficient? The linker errors complain of undefined symbols for 
> a lot of SDL functions.

Yes, porting SDL to D would be a big task.  I don't think it's 
necessary though because D has good support for binding to C 
APIs.  You can try compiling with -betterC to see if that gets 
rid of some of the linker errors you're encountering.  Otherwise, 
I'd need to see the linker output to understand what's going on.

Mike




More information about the Dlang-internal mailing list