Are you familiar with emscripten? It's not simple but it does exactly that, C++ in the browser.
never heard about emscripten