D and WebAssembly (Wasm)

Kenneth Dallmann fake at 123.con
Mon Sep 13 16:19:31 UTC 2021


   Greetings!

    Many people in the development community are very excited about
WebAssembly, because it allows the browser to interpret more 
robust
languages than JS.

    Rumor has it that D can compile to Wasm, but only in the 
"BetterC"
subset.

    LLVM can compile to Wasm, but unfortunately it may not support
systems IO calls because of the lack of operating system access.
Emscripten is a compiler that can transform C into something that
can run on Wasm without holes in the Standard Library.  It does
this by simulating an operating system, which adds overhead to the
runtime, but allows a full range of C to be used, to my 
understanding.

With D not being able to be run on Wasm in a meaning way: Why 
can't
we just compile D code to C, as a compiler output, and then run 
that
through Emscripten?






More information about the Digitalmars-d mailing list