OPT_CPP
Domain: Real Packages
π― Motivation
OPT_CPP is a serverless C++ code visualizer that runs entirely in the browser. Students write C++ code, and it shows step-by-step execution with variable values, memory layout, and pointer arrows β no installation, no server, just open a URL. It uses WebAssembly (xeus-cpp / clang-repl) to execute C++ directly in the browser.
π Concrete Example
Visit https://dive4dec.github.io/OPT_CPP/, paste your C++ code, and click βVisualize Executionβ. The tool compiles the code to WebAssembly, traces each line, and renders an interactive slider-based visualization. It also works offline once loaded.
π Analogy
Like a flight simulator for C++ β instead of actually flying (running code in a terminal), you sit in a simulator (browser) where you can pause, rewind, and examine every instrument (variable) at any moment. No risk, no setup, just learning.
π Connection to jupyter-cpp-tutor
jupyter-cpp-tutor is the Jupyter-embedded version that uses GDB for tracing. OPT_CPP is the browser-based version that uses WebAssembly. Both produce the same visualization style β use OPT_CPP for quick demos and exams (no install needed), use jupyter-cpp-tutor for deeper integration in Jupyter notebooks.
π¦ Links
- GitHub: https://github.com/dive4dec/OPT_CPP
- Live site: https://dive4dec.github.io/OPT_CPP/