Go to file
Félix Saparelli b91760da0f Relicense: Apache 2.0
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.
2022-01-22 18:14:31 +13:00
.github/workflows Disable freebsd builds again (keep the check) 2021-09-23 01:00:26 +12:00
bin Add citation.cff 2021-07-29 00:45:07 +12:00
completions Add -B option 2021-09-21 20:52:38 +12:00
src Start over for watchexec 2.0 2022-01-22 17:49:55 +13:00
tests Reformat 2022-01-22 17:40:09 +13:00
.editorconfig Reformat 2022-01-22 17:40:09 +13:00
.gitignore Relicense: Apache 2.0 2022-01-22 18:14:31 +13:00
.rustfmt.toml Reformat 2022-01-22 17:40:09 +13:00
CARETAKERS.md Use caretaker maintainership 2021-03-07 14:47:50 +13:00
CITATION.cff Relicense: Apache 2.0 2022-01-22 18:14:31 +13:00
CODE_OF_CONDUCT.md Upgrade Code of Conduct 2017-03-30 03:12:09 +13:00
Cargo.lock Start over for watchexec 2.0 2022-01-22 17:49:55 +13:00
Cargo.toml Relicense: Apache 2.0 2022-01-22 18:14:31 +13:00
LICENSE Relicense: Apache 2.0 2022-01-22 18:14:31 +13:00
README.md Relicense: Apache 2.0 2022-01-22 18:14:31 +13:00
TROUBLESHOOT.md Split readme into three files 2022-01-22 18:04:58 +13:00
USAGE.md Split readme into three files 2022-01-22 18:04:58 +13:00
cargo-watch.1 Relicense: Apache 2.0 2022-01-22 18:14:31 +13:00
cargo-watch.1.ronn Relicense: Apache 2.0 2022-01-22 18:14:31 +13:00
logo.png Add logo 2021-04-30 01:04:39 +12:00
logo.svg Add logo 2021-04-30 01:04:39 +12:00

README.md

$ cargo watch

Crate release version Crate license: Apache 2.0 Crate download count CI status MSRV: 1.58.0 MSRV policy: bump is non-breaking

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.

Install

Packaging status

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.