mirror of https://github.com/passcod/cargo-watch
b91760da0f
This aligns with the upstream (Watchexec). This is at the occasion of rewriting the entire application to use Watchexec 2.0, thus all the code is code I have written. |
||
---|---|---|
.github/workflows | ||
bin | ||
completions | ||
src | ||
tests | ||
.editorconfig | ||
.gitignore | ||
.rustfmt.toml | ||
CARETAKERS.md | ||
CITATION.cff | ||
CODE_OF_CONDUCT.md | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md | ||
TROUBLESHOOT.md | ||
USAGE.md | ||
cargo-watch.1 | ||
cargo-watch.1.ronn | ||
logo.png | ||
logo.svg |
README.md
$ cargo watch
Cargo Watch watches over your project's source for changes, and runs Cargo commands when they occur.
If you've used nodemon, guard, or entr, it will probably feel familiar.
- License: Apache 2.0.
- Website and more documentation: watchexec.github.io.
- Minimum Supported Rust Version: 1.58.0.
Install
Pre-built binaries are available from the website or alternatively on the Github Releases tab. Since 7.8.0, checksums and signatures are also provided; see download documentation for details.
$ cargo install cargo-watch
With cargo-binstall:
$ cargo binstall cargo-watch
Or clone and build with $ cargo build
then place in your $PATH.
This repository contains a manual page and Zsh completions that you may want to install.
Usage
By default, it runs check
. You can easily override this, though:
$ cargo watch [-x command]...
A few examples:
# Run tests only
$ cargo watch -x test
# Run check then tests
$ cargo watch -x check -x test
# Run run with arguments
$ cargo watch -x 'run -- --some-arg'
# Run an arbitrary command
$ cargo watch -- echo Hello world
# Run with features passed to cargo
$ cargo watch --features "foo,bar"
There's a lot more you can do! Check out:
About
Created by Félix Saparelli and awesome contributors.