Wasm is designed around bringing non-web-native languages to the web. A good project would have been to enable new web native languages to complement JavaScript. Instead, there's an emphasis particularly on bringing C++ to the web. I think this is counter to the philosophy of the platform and harmful in the long run.
https://en.wikipedia.org/wiki/LLVM#Front_ends
C++ just happens to be a popular choice because there are many useful C++ libraries, and the compiler already produces very optimized code, so the performance benefit is most noticeable. In particular, I'm excited to get the Lua interpreter, written in C, on the web in a performant way.
WebAssembly makes it even more common to run untrusted, random code on your system. The next RowHammer.js will be a lot more powerful.
Can't wait for this!
Otherwise, then, we should tell people they "must" use C to write applications and that othrr languages should be there only to "complement C."
Not trivial stuff at all.
Also, why do you call this "legacy C++ code"?