Warning
This project is still in development
preview.mp4
A (currently) bare-bones implementation of a hot-reloading system in C.
Clone this repo, cd into it and run make
cd into the examples/ directory and run make initially. Then cd into the main directory and run:
./main ./examples/<example name> ./examples/<example name>.c ./example Then you can change and save the <example name>.c file and watch it auto reload.
- Declare a constant named
HR_STATE_SIZE(of type size_t or similar) and set it to the size of the state you want to save (optional, default value is 0) - Define a function
void hr_setup(void* state). This will be run only once, when the hot-reloading program first loads your program. The parameter is a pointer to the memory which holds the state. (optional, defaults to do nothing) - Define a function
void hr_main(void* state). This will be called every time your code is reloaded.
- Raylib example
- Watch over directories
- Watch over multiple files
- Add option for custom build commands