3 ms·
For anyone interested in this: Tsoding (Twitch and YouTube streamer of "recreational programming") demonstrates this in one of his projects, where he hot reload
by fainpul 1y ago
For anyone interested in this: Tsoding (Twitch and YouTube streamer of "recreational programming") demonstrates this in one of his projects, where he hot reloads a dynamic library without interrupting the main program, to test different functionality.
https://youtu.be/Y57ruDOwH1g?si=feGioEeSZ5eborb3&t=84 https://youtu.be/Y57ruDOwH1g?si=feGioEeSZ5eborb3&t=84
- torginus 1y agoThis is cool and all, but the problem with doing this in C, is if you accidentally do a memory corruption bug while you're just messing about with the code, now you're forced to restart. Not a problem in a toy app, but in something like a huge program, it can be a PITA to reload everything and get back to where you were.
- throw10920 1y agoYeah, C really does not support this as a language (or implementation) feature - it's something that can be hacked in, with a lot of difficulty, inconvenience, and loss of safety guarantees.
- uecker 1y agoeBPF for apps?
- yencabulator 1y agoHere's an operating system kernel in Rust that can hot load/unload modules at ELF object boundaries, made safe by trusted compiler allowing only safe Rust: https://www.theseus-os.com/ https://www.theseus-os.com/ Upgrading a module in a way that changes its data structures still requires writing a converter from the old format to new.