Question about WebAssembly

Sebastiaan Koppe mail at
Wed Dec 11 10:52:47 UTC 2019

On Wednesday, 11 December 2019 at 08:40:13 UTC, Dukc wrote:
> On Wednesday, 11 December 2019 at 07:46:23 UTC, Jani Hur wrote:
>> Is D's WebAssembly support usable in Screeps 
>> ( ?
>> I just yesterday run into Screeps so I have no experience 
>> about it but the following caught my eye:
>> "Use JavaScript or compile other languages via WebAssembly."
> Yes it is. Interfacing will be real hard, but it can be done if 
> you somehow enjoy spending a large chunk of your freetime on 
> that.

Interfacing is indeed the hardest part. The bindings in spasm can 
help you with calling webapi's (although you will need a custom 
entry for Screeps, but it is just JS). I have started a 
typescript binding generator that can wrap typescript libraries, 
but that isn't fully completed yet.

Hopefully the webassembly interface types proposal will stabilise 
next year, as this will ease calling other languages and dealing 
with strings/structs/arrays.

More information about the Digitalmars-d mailing list