diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index a496365..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,17 +0,0 @@ -# Cargo configuration for this workspace. -# Full reference: https://doc.rust-lang.org/cargo/reference/config.html - -# --- Aliases --- -# Short-hand commands for the most common development workflows. -# Usage: cargo (e.g. `cargo ca`) -[alias] -# Type-check every crate and target (bins, tests, benches, examples) without codegen. -ca = "check --workspace --all-targets" -# Run Clippy across every crate and target; -D warnings turns warnings into errors. -la = "clippy --workspace --all-targets -- -D warnings" -# Run the full test suite across every workspace crate. -ta = "test --workspace" -# Run cargo-deny to check licenses, bans, advisories, and sources. -da = "deny --all-features check" -# Point Git at the project's hook directory. Run once after cloning (automatic in devcontainer). -setup = "!git config core.hooksPath .githooks" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 65c1785..1105695 100755 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -20,8 +20,8 @@ } }, // Install system libraries needed by build scripts (e.g. bindgen/libclang for iceoryx2), - // then install cargo-deny for local deny checks, and activate the git hooks. - "postCreateCommand": "sudo apt-get update && sudo apt-get install -y libclang-dev && sudo rm -rf /var/lib/apt/lists/* && cargo install --locked cargo-deny && git config core.hooksPath .githooks", + // install just (task runner) and cargo-deny, then activate the git hooks. + "postCreateCommand": "sudo apt-get update && sudo apt-get install -y libclang-dev just && sudo rm -rf /var/lib/apt/lists/* && cargo install --locked cargo-deny && just setup", // Configure tool-specific properties. "customizations": { "vscode": { diff --git a/Justfile b/Justfile new file mode 100644 index 0000000..e4c2f62 --- /dev/null +++ b/Justfile @@ -0,0 +1,33 @@ +# Just task runner for OATH. +# Full reference: https://just.systems/man/en/ +# +# Install: https://just.systems/man/en/packages.html +# Usage: just (e.g. `just ci`) + +# List all available recipes (default when running `just` with no arguments). +[private] +default: + @just --list + +# Point Git at the project's hook directory. Run once after cloning outside the devcontainer. +setup: + git config core.hooksPath .githooks + +# Type-check every crate and target without codegen. +check: + cargo check --workspace --all-targets + +# Run Clippy across every crate and target; warnings are errors. +lint: + cargo clippy --workspace --all-targets -- -D warnings + +# Run the full test suite. +test: + cargo test --workspace + +# Check licenses, bans, advisories, and sources. +deny: + cargo deny --all-features check + +# Run the full local CI suite: lint, test, and deny. +ci: lint test deny