version: '3'
tasks:
default:
desc: List available tasks
cmds:
- task --list --sort=none
silent: true
fmt:
desc: Format all Rust sources
aliases: [format]
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo fmt --all
fmt:check:
desc: Check formatting without modifying files
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo fmt --all -- --check
lint:
desc: Run clippy (all features, warnings as errors)
aliases: [lint:check]
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo clippy --all-targets --all-features -- -D warnings
lint:fix:
desc: Auto-fix clippy lints, then format
aliases: [fix]
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo clippy --all-targets --all-features --fix --allow-dirty --allow-staged
- task: fmt
check:
desc: Type-check without producing binaries
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo check --all-targets --all-features
- task: fmt:check
build:
desc: Build the crate (debug, all features)
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo build --all-targets --all-features
build:release:
desc: Build the crate (release, all features)
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo build --release --all-features
test:
desc: Run the test suite (all features, via nextest)
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
- sh: command -v cargo-nextest
msg: "cargo-nextest not found — cargo install cargo-nextest"
cmds:
- cargo nextest run --all-features {{.CLI_ARGS}}
test:doc:
desc: Run doctests (all features)
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo test --doc --all-features
doc:
desc: Build rustdoc (all features, no deps)
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo doc --all-features --no-deps
doc:open:
desc: Build and open rustdoc in the browser
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo doc --all-features --no-deps --open
clean:
desc: Remove build artifacts
status:
- test ! -d target
cmds:
- cargo clean
ci:
desc: Run checks expected in CI (fmt check, lint, test, doctests)
cmds:
- task: fmt:check
- task: lint
- task: test
- task: test:doc