Status of WASM support?

Sebastiaan Koppe mail at skoppe.eu
Fri Jul 31 21:18:25 UTC 2020


On Friday, 31 July 2020 at 16:23:16 UTC, JN wrote:
> What is the recommended way to roll a D app running in a web 
> browser at the moment? Spasm or something else? Last time I 
> remember Spasm could only allocate memory but couldn't 
> deallocate it, has it changed since then?

There is no reason why you can't deallocate, since it is just 
plain old manual memory management. The wasm allocator follows 
the stdx allocator so you can build on that.

I did experiment with a GC last year but I abandoned that in 
favor of porting druntime to wasm. The problems I ran into were 
mostly because 'new' isn't templated, so no amount of work I did 
would allow people to simply 'new' things, and instead they would 
always be stuck with custom allocators. Which is fine for some, 
but it is really barebones.

Since corona I have become a bit focussed on work, to the expense 
of literally everything else. I do hope that during the summer I 
can find time to finish it. It really is almost there.

Regardless, I think you best bet is to use the web api bindings 
in spasm and take it from there.


More information about the Digitalmars-d mailing list