Fast, modal wave editor
You need to have cargo-watch
installed:
cargo install cargo-watch
By far the easiest way to have live reload working is to use the provided Visual Studio Code tasks. The watcher tasks run automatically in the background once the project is opened, so it's just a matter of running the Run (live-reload)
task.
Nevertheless, here are the manual steps to achieve the same result.
- Run the following command at the root of the repository (do not launch the process in a debugger, reloading will not work):
cargo run --features "live-reload"
- Run the following cargo-watch commands in parallel in the
waved-core
directory:
cargo watch -w src -x build -s 'touch .trigger-watch'
cargo watch --no-gitignore -w .trigger-watch -s 'mv -f target/debug/libwaved_gui.dylib ../target/debug/libwaved_gui.dylib'
Make sure to use the right extension for your platform (.so
on Linux, .dylib
on macOS and .dll
on Windows) and to remove the lib
prefix on Windows.
Live-reload also works in release by simply replacing the occurrences of debug
with release
in the cargo watch
commands, as well as adding the --release
flag to the cargo run
command.