This is a Rust library that has a few goodies for working with the xtask
concept.
toml
[dependencies]
xtaskops = "0.1.0"
For most recent version see crates.io
If you've set up a local xtask
folder, and are building you tasks, you can use xtaskops
.
Coverage:
rust
use xtaskops::tasks;
// assuming you use `clap`
let res = match matches.subcommand() {
Some(("coverage", sm)) => tasks::coverage(sm.is_present("dev")),
//..
Run:
$ cargo xtask coverage
Recommended: alias cargo xtask
to x
:
```bash
alias x="cargo xtask" ```
```rust use xtaskops::ops::{removedir, createdir_all, cmd};
removedir("target")?;
createdir_all("target")?;
// cmd! is from the duct
library
cmd!("cargo", "watch", "-s", "cargo doc --no-deps").run()?;
Ok(())
```
Copyright (c) 2022 @jondot. See LICENSE for further details.