CARGO-WATCH(1) General Commands Manual CARGO-WATCH(1) (NAME) cargo-watch - Cargo (SYNOPSIS) +-----------------------+-----+---+----------------+ |cargo watch [--version | -V]| | -- - | +-----------------------+-----+---+----------------+ | cargo watch [--help | -h]| | -- - | +-----------------------+-----+---+----------------+ (DESCRIPTION) Cargo . (COMMANDS) cargo subcommand Cargo --postpone . cargo cargo --features . command --postpone . && . Cargo ( -x) ( -s) . -- . (OPTIONS) -h, --help . -V, --version . --debug (). --why . -q, --quiet cargo-watch. --skip-local-deps . . -w, --watch watch... () () . . (workspace) target/ .git/ . .ignore .gitignore . -i, --ignore pattern... glob/gitignore. (/) -i . --no-vcs-ignores .gitignore . --no-dot-ignores .ignore . --ignore-nothing target/ .git/. -c, --clear . -E, --env-var key=value . --env-file path dotenv. -B value RUST_BACKTRACE= . (panics) : RUST_BACKTRACE=1 -B1 ! -L value RUST_LOG= . --experimental--env-changes WATCHEXEC_* cargo watch . . . find . -C, --workdir path path . cargo locate-project . --postpone . --poll (polling) . --no-process-group Cargo Watch (process group) () . . -d, --delay delay (debounce) (: 0.5). --no-restart . --watch-when-idle . --features features (features) cargo . cargo . : $ cargo watch --features foo,bar -x clean -x build -x doc build doc foo bar clean . --use-shell use-shell . --use-shell=bash. --use-shell=powershell . none -x -s. (EXAMPLES) cargo check : $ cargo watch : $ cargo watch -x test check test: $ cargo watch -x check -x test run : $ cargo watch -x 'run -- --some-arg' : $ cargo watch -- echo Hello world cargo: $ cargo watch --features 'foo,bar' (DETAILS) (Ignore files) .gitignore . --no-vcs-ignores . .ignore . cargo watch --ignore abc . .ignore ripgrep(1) . --no-dot-ignores . Cargo watch target/ .git/ ( swap lock ). --ignore-nothing . (Ignore syntax) glob::Pattern https://doc.rust-lang.org/glob/glob/struct.Pattern.html glob --ignore . (\\) . (/) . / \\ . (BUGS) https://github.com/watchexec/cargo-watch/issues . --debug . watchexec . --debug --version . watchexec ( ) https://github.com/watchexec/watchexec/issues . cargo-watch watchexec . (KNOWN BUGS) 7.8.0 --workdir --watch . Watchexec . 8.x -B -L -E --env-var --env-file cargo-watch cargo-watch . Watchexec . (TROUBLESHOOTING) cargo watch --version . RLS cargo watch Cargo ( check clippy ) cargo . Rust Analyzer RLS . --poll . (safe saving) ( IntelliJ / PyCharm) <> . --why . . ( target/ ) -w target . . --watch-when-idle . 8.0 . . --why . . --watch-when-idle . cargo cargo test . ( ) --color=always : $ cargo watch -x 'check --color=always' test ( bench) cargo : $ cargo watch -x 'test -- --color=always' (AUTHOR) Felix Saparelli. https://passcod.name : https://watchexec.github.io/#cargo-watch (Public domain). October 2024 CARGO-WATCH(1)