Hacker News new | ask | show | jobs
by jheruty 1962 days ago
There is https://github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledC...

The idea is to use virtual functions, and recompile new classes into a shared library. The shared lib is linked into the running program, and old instances of the classes are deleted and replaced by new instances constructed from the shared library.

I am working on a library called hscpp using the same (stolen) idea here:

https://github.com/jheruty/hscpp

Proof of concept demo:

https://m.youtube.com/watch?v=pjGngeKgni8

hscpp is still very alpha, and I’m sure I’ll find lots of bugs as I work on a “real” demo. In contrast, Runtime Compiled C++ is quite mature and is used in real game projects.

Note that this approach very much limits your architecture. For example, you won’t be able to use statics, as the newly compiled shared libraries won’t see them.

It’s a finicky thing, worth it to me, but not something you can just plop in to an established project.