https://github.com/deingithub/zig-reload
proof of concept shared library code reloading with zig
https://github.com/deingithub/zig-reload
zig
Last synced: 8 months ago
JSON representation
proof of concept shared library code reloading with zig
- Host: GitHub
- URL: https://github.com/deingithub/zig-reload
- Owner: deingithub
- Created: 2020-01-16T14:57:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-01T13:21:27.000Z (almost 6 years ago)
- Last Synced: 2025-03-24T13:14:43.038Z (11 months ago)
- Topics: zig
- Language: Zig
- Size: 3.91 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zig-reload
Based around the idea of [this](https://nullprogram.com/blog/2014/12/23/), this is a proof-of-concept for code swapping using zig. Accordingly ugly.
Depends on a POSIX libc with inotify support. To run, first start the main program with `zig build; cd zig-cache/bin; ./run`, then edit the function `do_the_thing` in libreload.zig and rebuild the project using `zig build`. If everything works out, the program will reload the library and run the new function.