A lightweight, zero-dependency C++17 library for Windows dynamic link library (DLL) hot-swapping. Designed for games, engine engines, and tools to accelerate development iteration times.
- ⚡ Instant Reloads: Automatically detects file changes and reloads DLLs in milliseconds.
- 🔒 Bypasses Windows File Locking: Copies target binaries to temporary files to avoid process lockouts.
- 📦 Zero Dependencies: Pure C++17 and Win32 API (
ReadDirectoryChangesW,LoadLibraryA). - 🛠️ CMake Ready: Easy integration as a static library or submodule.
If this library saved you time, feel free to support the project!
- EVM (ETH / BNB / Polygon / USDT / USDC):
0x4B4d23cdeD10F5585B219066127422c62D8D09C6
#include <live_reloader/live_reloader.hpp>
#include <iostream>
int main() {
// Initialize watcher for your plugin DLL
LiveReloader reloader("test_plugin.dll");
while (true) {
// Poll for modifications and auto-reload
if (reloader.update()) {
std::cout << "[LiveReloader] Plugin reloaded successfully!\n";
}
// Execute your hot-swappable logic
auto print_func = reloader.get_function<void(*)()>("plugin_print");
if (print_func) {
print_func();
}
}
}