# Default: show available commands
default:
@just --list
version := `cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].version'`
# Check compilation
check:
cargo check
# Build debug
build:
cargo build
# Build release
release:
cargo build --release
# Run tests
test:
cargo test
# Run clippy
lint:
cargo clippy -- -D warnings
# Format code
fmt:
cargo fmt
# Check formatting
fmt-check:
cargo fmt -- --check
# Run all checks (for pre-release)
ci: fmt-check lint test
# Install locally
install:
cargo install --path .
# Clean build artifacts
clean:
cargo clean
# --- Release ---
# Show current version
version:
@echo "v{{version}}"
# Create git tag for current version
tag:
git tag -a "v{{version}}" -m "Release v{{version}}"
@echo "Created tag v{{version}}. Push with: git push origin v{{version}}"
# Push tag to origin
push-tag:
git push origin "v{{version}}"
# --- Future: Binary Distribution ---
# Requires: cargo install cross
# Build for macOS ARM
[macos]
dist-macos-arm:
cargo build --release --target aarch64-apple-darwin
# Build for macOS x86_64
[macos]
dist-macos-x86:
cargo build --release --target x86_64-apple-darwin
# Build for Linux x86_64 (requires cross)
dist-linux:
@echo "TODO: cross build --release --target x86_64-unknown-linux-gnu"
# Build all distribution targets
dist: release
@echo "TODO: implement cross-platform builds"
@echo "See: https://github.com/cross-rs/cross"
@echo "Or: cargo install cargo-dist"