- Instead of porting the D runtime, it uses a lightweight, runtimeless
- It uses Docker to manage the Emscripten installation.
LDC has recently gained support for compiling directly to WebAssembly, but (unlike the Emscripten approach) that doesn’t automatically get you libraries.
You can find the complete working code on
./run.sh starts a shell in a Docker image that contains the development environment.
This tutorial is translated from a Japanese post by outlandkarasu, who deserves all the credit for figuring this stuff out.