| 1 | {% raw %}arm_target := "aarch64-unknown-linux-gnu" |
| 2 | |
| 3 | default: |
| 4 | @just --list |
| 5 | |
| 6 | # Build debug binary |
| 7 | build *args: |
| 8 | cargo build {{args}} |
| 9 | |
| 10 | # Build optimized release binary (x86_64) |
| 11 | build-release: |
| 12 | cargo build --release |
| 13 | |
| 14 | # Cross-compile ARM64 release binary |
| 15 | build-arm: |
| 16 | cargo build --release --target {{arm_target}} |
| 17 | |
| 18 | # Run locally with arguments |
| 19 | run *args: |
| 20 | cargo run -- {{args}} |
| 21 | |
| 22 | # Fast type and borrow check |
| 23 | check: |
| 24 | cargo check --all-targets --all-features |
| 25 | |
| 26 | # Format all Rust code |
| 27 | fmt: |
| 28 | cargo fmt --all |
| 29 | |
| 30 | # Check formatting without modifying files |
| 31 | fmt-check: |
| 32 | cargo fmt --all -- --check |
| 33 | |
| 34 | # Run Clippy with all warnings denied |
| 35 | lint: |
| 36 | cargo clippy --all-targets --all-features -- -D warnings |
| 37 | |
| 38 | # Run all unit and integration tests |
| 39 | test *args: |
| 40 | cargo test --all-targets --all-features {{args}} |
| 41 | |
| 42 | # Run full CI quality gate locally (format check, clippy, tests) |
| 43 | ci: fmt-check lint test |
| 44 | |
| 45 | # Preview changelog for unreleased commits |
| 46 | changelog-preview: |
| 47 | git-cliff --unreleased |
| 48 | |
| 49 | # Dry-run a version bump (patch, minor, major) |
| 50 | release-dry level="patch": |
| 51 | cargo release {{level}} |
| 52 | |
| 53 | # Execute a version bump, update CHANGELOG.md via git-cliff, tag, and push |
| 54 | release level="patch": |
| 55 | cargo release {{level}} --execute |
| 56 | |
| 57 | # Remove build artifacts |
| 58 | clean: |
| 59 | cargo clean |
| 60 | {% endraw %} |
