I spent a lot of hair tearing to figure out the minimal amount of work needed to get some C++ to output to HTML.
Simply clone this gist into a directory and everything should be good to go. You can run the build.sh
file after a chmod +x
, or just run the command manually. Anything goes, really.
This was written on April 22nd, 2019. Things are apparently changing enough that this might not be valid in the future. A lot of the work is handled by the wasm-ld
tool, rather than by clang. It makes me wonder if something like CMake integration is even possible. That said, this code was run and tested on windows, in addition to linux and macOS. I used the 8.0 release of clang.
Great work! I'm going to see if it works on my Windows 10 PC.