cargo-watch 7.2.2

Watches over your Cargo project’s source
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Watch files in a Cargo project and compile it when they change
#![forbid(unsafe_code, clippy::pedantic)]

extern crate cargo_watch;
extern crate watchexec;

fn main() -> watchexec::error::Result<()> {
    let matches = cargo_watch::args::parse();

    cargo_watch::change_dir();

    let quiet = matches.is_present("quiet");
    let debug = matches.is_present("debug");
    let opts = cargo_watch::get_options(debug, &matches);
    let handler = cargo_watch::watch::CwHandler::new(opts, quiet)?;
    watchexec::run::watch(&handler)
}