version: '3'
tasks:
default:
desc: List available tasks
cmds:
- task --list --sort=none
silent: true
build:
desc: Build the crate and all targets (all features)
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo build --all-features --all-targets
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
cmds:
- cargo fmt --all -- --check
lint:
desc: Run clippy across all targets and features (warnings as errors)
aliases: [lint:check]
preconditions:
- sh: cargo clippy --version
msg: "clippy not found — rustup component add clippy"
cmds:
- cargo clippy --all-features --all-targets -- -D warnings
lint:fix:
desc: Auto-fix clippy lints, then format
aliases: [fix]
cmds:
- cargo clippy --all-features --all-targets --fix --allow-dirty --allow-staged
- task: fmt
check:
desc: Type-check all targets and verify formatting
cmds:
- cargo check --all-features --all-targets
- task: fmt:check
test:
desc: Run the test suite (all features) — pass extra args after `--`
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
cmds:
- cargo test --all-features --all-targets {{.CLI_ARGS}}
test:doc:
desc: Run doctests (all features)
cmds:
- cargo test --all-features --doc
test:no-features:
desc: Run the test suite with default (no) features
cmds:
- cargo test --no-default-features
test:loom:
desc: Model-check the sync core with loom (exhaustive thread interleavings)
preconditions:
- sh: command -v cargo
msg: "cargo not found — install Rust from https://rustup.rs/"
env:
RUSTFLAGS: "--cfg loom"
cmds:
- cargo test --release --test loom
test:matrix:
desc: Run every feature combination, doctests, and loom
cmds:
- task: test:no-features
- task: test
- task: test:doc
- task: test:loom
docs:
desc: Build rustdoc (all features, no deps)
aliases: [doc]
cmds:
- cargo doc --all-features --no-deps
docs:open:
desc: Build and open rustdoc in the browser
aliases: [doc:open]
cmds:
- cargo doc --all-features --no-deps --open
clean:
desc: Remove build artifacts
status:
- test ! -d target
cmds:
- cargo clean
ci:
desc: Run the full CI sequence (fmt check, lint, full test matrix)
cmds:
- task: fmt:check
- task: lint
- task: test:matrix