xtaskops

github crates.io docs.rs build status

This is a Rust library that has a few goodies for working with the xtask concept.

Dependency

toml [dependencies] xtaskops = "0.2.2"

For most recent version see crates.io

Usage

You should have the xtask concept already set up for your project.

Available Tasks

Full workflow tasks for your daily development.

Here's an example for how to integrate the coverage task with clap:

rust use xtaskops::tasks; // assuming you use `clap` let res = match matches.subcommand() { Some(("coverage", sm)) => tasks::coverage(sm.is_present("dev")), //..

Quick start

You can include everything from xtask in your project. In your xtask/main.rs:

rust fn main() -> Result<(), anyhow::Error> { xtaskops::tasks::main() }

Ops

Low level convenience operations, for file system operations, user input and more.

```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(()) ```

Running Tasks

Run:

$ cargo xtask coverage

Recommended: alias cargo xtask to x:

```bash

in your zshrc/shell rcfile

alias x="cargo xtask" ```

Copyright

Copyright (c) 2022 @jondot. See LICENSE for further details.