On Wednesday, 24 May 2017 at 17:47:42 UTC, Suliman wrote:
It's it's possible to [compile to WASM] with D?
It should be.

LLVM has a working WebAssembly backend ; LDC might need some slight modifications to become aware of this new target. Everything that don't rely on the D runtime should work (except for bugs, e.g https://github.com/kripken/emscripten-fastcomp/issues/187 ).

Then, I think the following blog post could be easily adapted for the D langage:
https://medium.com/@mbebenita/lets-write-pong-in-webassembly-ac3a8e7c4591

However, please keep in mind that the target instruction set is only the tip of the iceberg ; you have to provide a target environment (like SDL bindings or a simplified D runtime), so the generated code can do anything usefull (like I/O).


Reply via email to