4 ms·
Yes. On Rust specifically https://fasterthanli.me/articles/so-you-want-to-live-reload-rust https://fasterthanli.me/articles/so-you-want-to-live-reload-... (disc
by nextaccountic 5y ago
Yes. On Rust specifically https://fasterthanli.me/articles/so-you-want-to-live-reload-rust https://fasterthanli.me/articles/so-you-want-to-live-reload-... (discussed here https://www.reddit.com/r/rust/comments/j0ajdy/so_you_want_to_livereload_rust/ https://www.reddit.com/r/rust/comments/j0ajdy/so_you_want_to...)
And then there's this crate https://docs.rs/live-reload/0.2.0/live_reload/ https://docs.rs/live-reload/0.2.0/live_reload/ which works on the same principles as the article above, and is based on C code (i.e. the same approach works for C). On the documentation there's links to "Interactive Programming in C" http://nullprogram.com/blog/2014/12/23/ http://nullprogram.com/blog/2014/12/23/ and "Loading Game Code Dynamically" https://www.youtube.com/watch?v=WMSBRk5WG58 https://www.youtube.com/watch?v=WMSBRk5WG58 (this video by Casey Muratori is btw where I first heard about this technique)
There's a bunch of other libraries that work the same way, and some example code that can do this. I can find https://github.com/irh/rust-hot-reloading https://github.com/irh/rust-hot-reloading and https://github.com/porglezomp-misc/live-reloading-rs https://github.com/porglezomp-misc/live-reloading-rs and https://github.com/xixixao/hot-reload-rs https://github.com/xixixao/hot-reload-rs and https://github.com/emoon/dynamic_reload https://github.com/emoon/dynamic_reload
And there's https://github.com/draivin/rust-hotswap https://github.com/draivin/rust-hotswap which has a nice API but uses a deprecated rustc internal API and doesn't build anymore.
Anyway there was a library that did this in a more elegant way and I just can't find it (perhaps it was rust-hotswap?).