extern(C): // disable D mangling int add_two(int a, int b){ return a + b; } void _start(){ } // seems to be the required entry point // https://wiki.dlang.org/Generating_WebAssembly_with_LDC