Crates.io | xtaskops |
lib.rs | xtaskops |
version | 0.4.2 |
source | src |
created_at | 2022-08-09 17:43:28.094299 |
updated_at | 2023-05-04 07:31:03.809175 |
description | Goodies for working with the xtask concept |
homepage | |
repository | https://github.com/jondot/xtaskops |
max_upload_size | |
id | 641943 |
size | 14,993 |
This is a Rust library that has a few goodies for working with the xtask
concept.
[dependencies]
xtaskops = "0.4.0"
For most recent version see crates.io
You should have the xtask
concept already set up for your project.
Full workflow tasks for your daily development.
cargo check
followed by cargo test
for every file changeHere's an example for how to integrate the coverage task with clap
:
use xtaskops::tasks;
// assuming you use `clap`
let res = match matches.subcommand() {
Some(("coverage", sm)) => tasks::coverage(sm.is_present("dev")),
//..
You can include everything from xtask
in your project. In your xtask/main.rs
:
fn main() -> Result<(), anyhow::Error> {
xtaskops::tasks::main()
}
Low level convenience operations, for file system operations, user input and more.
use xtaskops::ops::{remove_dir, create_dir_all, cmd};
remove_dir("target")?;
create_dir_all("target")?;
// cmd! is from the `duct` library
cmd!("cargo", "watch", "-s", "cargo doc --no-deps").run()?;
Ok(())
Run:
$ cargo xtask coverage
Recommended: alias cargo xtask
to x
:
# in your zshrc/shell rcfile
alias x="cargo xtask"
Copyright (c) 2022 @jondot. See LICENSE for further details.