I’ve just installed the rust-analyzer
VS Code extension and configured “format on save” using rustfmt
. Hitting the “Run” button also works nicely. However, in order to speed up my workflow, I’d like to automatically have “cargo run” on save.
I’ve seen that there’s cargo watch
that seems to do the job, but I’ve also read that it might collide with rust-analyzer
. Some even seem to use nodemon. Which makes me wonder: isn’t there an official way to run Rust programs on save? How do you optimize your workflow?
https://users.rust-lang.org/t/vscode-rust-analyzer-and-cargo-watch-x-run-recompile-when-saving/85671