rust-hot-reload icon indicating copy to clipboard operation
rust-hot-reload copied to clipboard

hot-reload template for Rust

This is a template for cargo-generate. Use with cargo generate rksm/rust-hot-reload.

{{project-name}}

A workflow for quick feedback while writing Rust! See https://github.com/rksm/hot-lib-reloader-rs and https://robert.kra.hn/posts/hot-reloading-rust/ for more info.

Usage

Hot reload for development

For development use two terminals to run the binary and (re-)build the lib:

$ cargo watch -i lib -x 'run --features reload'
$ cargo watch -w lib -x 'build -p lib'

With cargo runcc you just need to run cargo runcc -c runcc.yml.

Statically build or run for release

cargo build --release
cargo run --release