knit := "knit" cargo := "cargo" # Show this help message default: @just --list # Build every tool all: {{ knit }} all # Build one or more tools build +targets: {{ knit }} {{ "bin/" + replace(targets, " ", " bin/") }} # Build and run a tool run target *args: @{{ knit }} bin/{{ target }} && ./bin/{{ target }} {{ args }} # Build and copy tools to ~/.local/bin deploy +targets: {{ knit }} {{ "deploy/" + replace(targets, " ", " deploy/") }} # Run all test suites test: {{ cargo }} test --workspace cd pracomer && zig build test cd wrd && go test ./... cd bandano && go test ./... python3 -m unittest discover -s mpd/tests -v # Run `cargo clippy` over the workspace clippy: {{ cargo }} clippy --workspace --all-targets # Format the Rust workspace with rustfmt rustfmt: {{ cargo }} fmt --all # Run clang-tidy over every C file clang-tidy: fd -e c -X clang-tidy {} -- -std=c17 -D_POSIX_C_SOURCE=200809L # Run all linters lint: clippy clang-tidy # Update `requirements.txt` lockfile from requirements.in pip-update: {{ knit }} .venv-stamp .venv/bin/pip install --quiet pip-tools .venv/bin/pip-compile --generate-hashes --strip-extras requirements.in -o requirements.txt # Update `Cargo.lock` lockfile cargo-lockfile: {{ cargo }} generate-lockfile # Remove build artifacts and caches clean: {{ cargo }} clean fd -H -I -t d '^(zig-out|\.zig-cache|vendor)$' -X rm -rf find bin -type f -delete rm -rf .venv .knit .venv-stamp