/** * Hiload is an Elf hotreloader that patches C and C++ code live while * developing, significantly tightening the traditional feedback loop. * * Currently not supported: * - modifying he executable * - modifying modules loaded at runtime, only those present at startup count * - modifying two modules with depending changes at the same time */ #ifndef HILOAD_H_ #define HILOAD_H_ #include "hitypes.h" #include #ifdef __cplusplus extern "C" { #endif // Allows using -fvisibility=hidden by default, decreasing visible symbols #pragma GCC visibility push(default) /** * Must be called before other functions. Sets up filewatchers for the relevant * files * @n n Number of modules in @a enabled_modules * @param enabled_modules The name of a module that should have its changes * applied to the running process. A short form is expected, e.g. * `libhiload.so`. An empty string denotes the executable of the running * process. */ int hi_init(size_t n, const char **enabled_modules); /** * Call when hiload is no longer needed. */ void hi_deinit(void); /** * Reload all enabled modules that have been changed since init or last * invocation and apply changes to the running process. */ HiResult hi_reload(void); #pragma GCC visibility pop #ifdef __cplusplus } #endif #endif // HILOAD_H_