This examples shows to make hot reloading configurable using a feature.
For development use two terminals and run the binary
cargo watch -i lib -x 'run --features reload'
and (re-)build the lib
cargo watch -w lib -x 'build -p lib'
To run with a statically compiled binary just do
cargo run