.PHONY: build test coverage lint format check-all clean help npm-audit-fix
help:
@echo "Available targets:"
@echo " build - Build the project"
@echo " test - Run tests with nextest"
@echo " coverage - Generate test coverage report"
@echo " lint - Run clippy linter"
@echo " format - Format code with rustfmt"
@echo " check-all - Run all quality checks"
@echo " bench - Run performance benchmarks"
@echo " clean - Clean build artifacts"
@echo " npm-audit-fix - Run npm audit fix in all example packages"
build:
cargo build
test:
cargo nextest run
coverage:
cargo llvm-cov nextest --html
@echo "\n=== Coverage Summary ==="
cargo llvm-cov nextest --summary-only
lint:
cargo clippy --all-targets --all-features -- -D warnings
format:
cargo fmt
format-check:
cargo fmt --check
check-all: format-check lint test
bench:
@echo "Running performance benchmarks..."
cargo bench --bench performance
clean:
cargo clean
npm-audit-fix:
@for pkg in $$(find examples -name "package.json" -not -path "*/node_modules/*"); do \
dir=$$(dirname $$pkg); \
echo "=== Auditing $$dir ==="; \
(cd $$dir && npm audit fix) || true; \
done