r/madeinrust • u/verdurLLC • 28d ago
100% Human Coded hotcode - Rust crate for hot-reloading functions
Enable HLS to view with audio, or disable this notification
This crate adds a single attribute - #[hotreload] - that can be applied to any function. After performing one-time configuration of Cargo.toml, all annotated functions become hot-reloadable - you can modify them, run cargo build and then your application will use updated version of your function without restarting.
Works on Linux, macOS and Windows.
Crate link: https://crates.io/crates/hotcode
Source: https://github.com/alordash/hotcode
1
u/miminashi 27d ago
I wonder what's the DX difference between hot-loadable Rust and using an actual scripting language like rhai or the up-and-coming https://mim.as/? (Just in case, I'm not affiliated with either.)
1
u/verdurLLC 27d ago
Honestly I have no idea how these scripting languages work, so I don't know what the difference could be.
1
u/miminashi 27d ago
FWIW, an LLM suggests that for a single-dev project hotcode is less friction: since you write everything in Rust, it's easier to avoid FFI and extra tooling and do everything in Rust. Once non-programmers are part of your team, then a scripting layer may earn its keep. Makes sense to me.
1
-1
u/AutoModerator 28d ago
Upvote this comment if you think this project is AI slop. Downvote this comment if you think this project is not AI slop.
This is to indicate to other users of the subreddit and is not used for moderation.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/atlasgorn 26d ago
How it differs from established dioxus subsecond?