Use can use emscripten to run **portable** C++ code in a web browser. Basically, you feed emscripten your C/C++ and it will spit out javascript.