I know emscripten and llvm, but none of them are written in browser-specific JS.
As far as I can tell, the tools exist, but they were not combined, but I could well miss some key factor, which makes it very difficult to compile C ++ for javascript in the browser.
So, I will talk about my naive implementation:
- Compile Emscripten in C, then use clang to compile it in llvm, and then use emscripten to compile it in javascript.
- Compile clang in llvm and then compile it in javascript via emscripten.
- Write C ++ and run it through javascript clang, then run this llvm via emscripten to get JS
- Run the resulting JS!
I am sure that I have something missing at my steps. Please let me know and let me know if any community efforts are being made to resolve these missing points.
EDITING: the most optimal of all the stocks we found is the most effective function, but it does not have many features, and, frankly, the author took an absurd undertaking, trying to rewrite the parser, etc. on your own, instead of using existing tools. However, close and pretty neat https://github.com/felixhao28/JSCPP
source share