4 ms·
Is it possible/already existing to have interactive C++ lessons where the user's C++ code is compiled an run client-side in a web page?
by corysama 2y ago
Is it possible/already existing to have interactive C++ lessons where the user's C++ code is compiled an run client-side in a web page?
- fwip 2y agoDefinitely been possible for at least 5 years now. Would probably be a weekend project now.
- legobmw99 2y agoSee: emception https://github.com/jprendes/emception https://github.com/jprendes/emception
- nunobrito 2y agoThanks, I'm seeing but the documentation is so scarce and I'm not a proefficient C expert. What syntax can be used to run emception? Thank you.
- legobmw99 2y agoIt’s sadly a bit more of a proof of concept than a hackable project. The docker build in the readme did work last time I tried, and there is a demo site at https://jprendes.github.io/emception/ https://jprendes.github.io/emception/, but I’ve failed to modify it in the past to do other things There is a fork at https://github.com/emception/emception https://github.com/emception/emception that is trying to make it more production ready, but it looks like that may have stalled
- nunobrito 2y agoI guess the search for compiling C++ on some kind of bytecode continues. Thanks a bunch for the links and details, much appreciated.
- halb 2y agoAbsolutely! You can even run clang in wasm targeting x86_64, and then emulate the resulting program using the blink x86_64 emulator. I'm working on something similar, where students can compile intel assembly and run it client-side: https://github.com/robalb/x86-64-playground https://github.com/robalb/x86-64-playground