.PHONY: all build test bench check fmt lint clean doc audit
all: fmt check test
build:
@echo "Building project..."
@cargo build --all-features
release:
@echo "Building release..."
@cargo build --release --all-features
test:
@echo "Running tests..."
@cargo test --all-features
bench:
@echo "Running benchmarks..."
@cargo bench --all-features
check:
@echo "Checking code..."
@cargo check --all-features
fmt:
@echo "Formatting code..."
@cargo fmt --all
lint:
@echo "Running clippy..."
@cargo clippy --all-targets --all-features -- -D warnings
clean:
@echo "Cleaning..."
@cargo clean
doc:
@echo "Generating documentation..."
@cargo doc --all-features --no-deps --open
audit:
@echo "Running security audit..."
@cargo audit
ci: fmt lint test doc
setup:
@echo "Installing development dependencies..."
@rustup component add rustfmt clippy
@cargo install cargo-audit
test-features:
@echo "Testing with no features..."
@cargo test --no-default-features
@echo "Testing with default features..."
@cargo test
@echo "Testing with all features..."
@cargo test --all-features
examples:
@echo "Running examples..."
@cargo run --example create_test_gguf
@cargo run --example inspect_gguf test_model.gguf || true
msrv:
@echo "Checking MSRV (1.89.0)..."
@cargo +1.89.0 check --all-features
help:
@echo "Available targets:"
@echo " all - Format, check, and test (default)"
@echo " build - Build the project"
@echo " release - Build in release mode"
@echo " test - Run tests"
@echo " bench - Run benchmarks"
@echo " check - Check code compilation"
@echo " fmt - Format code"
@echo " lint - Run clippy linter"
@echo " clean - Clean build artifacts"
@echo " doc - Generate documentation"
@echo " audit - Run security audit"
@echo " ci - Run all CI checks"
@echo " setup - Install development dependencies"
@echo " test-features - Test with different feature combinations"
@echo " examples - Run examples"
@echo " msrv - Check minimum supported Rust version"
@echo " help - Show this help message"