Good News: Almost all druntime supported on arsd webassembly

Ferhat Kurtulmuş aferust at gmail.com
Mon Jan 9 12:14:15 UTC 2023


On Friday, 6 January 2023 at 22:39:36 UTC, Adam D Ruppe wrote:
> On Friday, 6 January 2023 at 22:14:23 UTC, Ferhat Kurtulmuş 
> wrote:
>> One question. Does GC work with Adam's druntime for wasm?
>
> I haven't actually written one yet, so it leaks if you don't 
> pay attention yourself. But I have a plan that should work: you 
> do the setTimeout(collect, 0) so it runs when the event loop is 
> idle. Then the wasm stack is empty so you can scan pure memory.
>
>> IMHO, D's GC need a second thread
>
> This isn't true, it never needs a second thread, even on normal 
> desktop.
>
> The problem with GC on wasm is the webasm stack is opaque. You 
> can have the compiler output a shadow stack or my plan of 
> scanning when it is empty. Either should work but I haven't had 
> time to implement anything.

thank you for the clarification, Adam.


More information about the Digitalmars-d-announce mailing list