Proposal for porting D runtime to WebAssembly

Sebastiaan Koppe mail at skoppe.eu
Tue Nov 26 20:49:59 UTC 2019


On Tuesday, 26 November 2019 at 09:18:05 UTC, Thomas Brix wrote:
> 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: 
>> https://gist.github.com/skoppe/7617ceba6afd67b2e20c6be4f922725d
>
> An alternative idea, would be to use emscriptens fork of musl 
> to have a full C-library. AFAIK this includes threading.
>
> LLVM is supposed to support TLS in wasm since version 9.

Yes, indeed. https://reviews.llvm.org/D64537 gives a good 
overview.

I believe it is best to first actually have a version of druntime 
on wasm, rather than eagerly pulling in all the latest features. 
I find the scope I set in the proposal to be quite reasonable.

Adding tls, threading and exception handling would be much easier 
after this work is done and merged. And it would also be 
something others might want to contribute to.


More information about the Digitalmars-d-announce mailing list