Proposal for porting D runtime to WebAssembly

Sebastiaan Koppe mail at
Fri Jan 3 10:34:40 UTC 2020

On Saturday, 23 November 2019 at 10:29:24 UTC, Johan Engelen 
> On Saturday, 23 November 2019 at 09:51:13 UTC, Sebastiaan Koppe 
> wrote:
>> This is my proposal for porting D runtime to WebAssembly. I 
>> would like to ask you to review it. You can find it here: 
> I'm assuming you already started some work in this area? Where 
> can we track it?
> Great initiative!
>   Johan

You can track the work here:

Almost all unittests pass.

I am in the process of getting `ldc-build-druntime` to build it, 
as well as hooking into main().

I really wanted to make a pr, so that others can build it as 
well, but I am pressed for time due to family weekend trip. It is 
on my list once I get back, as well as incorpareting all info 
from this thread back into the proposal.

Some things to tackle before going beta:

- AA unittests fail
- reals (probably are going to be unsupported)
- wasi libc needs to be distributed (either in source and 
compiled into wasm druntime) or statically linked
- CI (but should be doable once ldc-build-druntime works)
- hooking into main() (I thought about making a @weak _start() in 
druntime so that users can still override it when they want) 
(_start is the wasm's equivalent of _Dmain)
- probably need help from LDC to spill i32 pointer on the shadow 

More information about the Digitalmars-d-announce mailing list