MSRV := 1.74
.PHONY: all check fmt clippy test build msrv-check ci clean help
all: check
check:
cargo check --all-features
fmt:
cargo fmt --all -- --check
fmt-fix:
cargo fmt --all
clippy:
cargo clippy --all-targets --all-features -- -D warnings
test:
cargo test --verbose
build:
cargo build --release
msrv-check:
@echo "Checking MSRV ($(MSRV))..."
@if command -v rustup >/dev/null 2>&1; then \
rustup run $(MSRV) cargo check --all-features; \
else \
echo "Warning: rustup not found. Skipping MSRV check."; \
echo "Install rustup to enable MSRV verification."; \
fi
ci: fmt clippy test msrv-check
@echo "All CI checks passed!"
clean:
cargo clean
help:
@echo "Available targets:"
@echo " all - Run 'check' (default)"
@echo " check - Run cargo check"
@echo " fmt - Check code formatting"
@echo " fmt-fix - Apply code formatting"
@echo " clippy - Run Clippy lints"
@echo " test - Run tests"
@echo " build - Build release binary"
@echo " msrv-check - Verify build with MSRV ($(MSRV))"
@echo " ci - Run all CI checks locally"
@echo " clean - Clean build artifacts"
@echo " help - Show this help"