Interactive C++ Compilation (REPL) Done in a Tiny and Embeddable Way
summary
A tiny embeddable REPL compiles submitted C++ into shared-plugin snapshots, links them to the running executable, and initializes globals in top-to-bottom order so state persists across submissions while new plugins accumulate on disk. Implementation fits in five source files (~800 LOC) with a 400-line parser for vars/global/once sections, supports C++11, uses one small fork helper, and shows practical results through two live demos (an interactive squares scene and a modular engine using dynamix), with notes on limitations like function address churn and crash handling.
AI-written summary · about
chapters (6)
- 0:00Introduction to C++ REPL
- 3:17First demo of interactive compilation
- 18:36Technical implementation details
- 21:08Second demo with dynamix library
- 26:30Key takeaways and future work
- 27:11Q&A session
related talks
06mLightning Talk: I Wrote a C++ REPL in 20 Lines of Code - And so can you!
48mInteractive Java Support to your tool
32mFeedback and the REPL
36mParty REPL — A multi-player REPL built for pair-programming
32mREPL, do you speak it
15mThe Projucer
33mReal Time Recompilation of Running JavaScript
01h 37mReflection: Compile-Time Introspection of C++
