Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romac/cargo-watch
Run a Cargo command everytime a source file changes (DEPRECATED)
https://github.com/romac/cargo-watch
Last synced: 8 days ago
JSON representation
Run a Cargo command everytime a source file changes (DEPRECATED)
- Host: GitHub
- URL: https://github.com/romac/cargo-watch
- Owner: romac
- Created: 2014-11-04T22:00:55.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-10T17:02:03.000Z (over 9 years ago)
- Last Synced: 2024-04-14T07:35:41.175Z (7 months ago)
- Language: Shell
- Homepage: https://github.com/passcod/cargo-watch
- Size: 214 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cargo-watch
> Run a Cargo command (defaults to `run`) everytime a source file changes.
This should work on any POSIX environment where [`fswatch`](https://github.com/emcrisostomo/fswatch) is available.
I quickly threw this together because [passcod/cargo-watch](https://github.com/passcod/cargo-watch) doesn't support Mac OS X, and I was tired of running `cargo build` by hand everytime I updated a source file.
**Update: @passcod's [cargo-watch](https://github.com/passcod/cargo-watch) now supports Mac OS X thanks to his [notify](https://github.com/passcod/rsnotify) library. This project is now considered deprecated.**
## Usage
```
Usage:
cargo watch [options] []Options:
-h Display this message.
-d DIR Watch files in the given directory [default: src/].Requirements:
This command requires fswatch to be present on your system.
Use your favorite package manager to install it (MacPorts, Homebrew, apt, etc).
```## Installation
1. Install `fswatch` using your favorite package manager (MacPorts, Homebrew, apt, etc).
2. Copy `cargo-watch` somewhere in your `$PATH`. Eg. `$ cp cargo-watch ~/.bin/cargo-watch`
3. Make it executable. Eg. `$ chmod +x ~/.bin/cargo-watch`
4. Then call the `watch` command as a normal `cargo` command. Eg. `$ cargo watch test`
## License
cargo-watch is released under the [MIT license](http://romac.mit-license.org).