.PHONY: help build test clean fmt clippy doc bench fuzz install coverage audit
help:
@echo "Available targets:"
@echo " build - Build the project"
@echo " test - Run all tests"
@echo " clean - Clean build artifacts"
@echo " fmt - Format code"
@echo " clippy - Run clippy lints"
@echo " doc - Generate documentation"
@echo " bench - Run benchmarks"
@echo " fuzz - Run fuzzing (requires nightly)"
@echo " install - Install development tools"
@echo " coverage - Generate coverage report"
@echo " audit - Run security audit"
@echo " check-all - Run all checks (fmt, clippy, test, audit)"
build:
cargo build --all-features
build-release:
cargo build --release --all-features
test:
cargo test --all-features --verbose
test-coverage:
cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
@echo "Coverage report generated at lcov.info"
clean:
cargo clean
rm -rf target/coverage/
rm -f lcov.info coverage.xml
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all -- --check
clippy:
cargo clippy --all-features --all-targets -- -D warnings
doc:
cargo doc --all-features --no-deps --document-private-items
doc-open:
cargo doc --all-features --no-deps --open
bench:
cargo bench --all-features
fuzz:
cd fuzz && cargo +nightly fuzz run cilobject -- -max_total_time=60
install:
rustup component add clippy rustfmt llvm-tools-preview
cargo install cargo-fuzz cargo-audit cargo-outdated cargo-llvm-cov
coverage:
cargo llvm-cov --all-features --workspace --html
@echo "HTML coverage report generated at target/llvm-cov/html/index.html"
audit:
cargo audit
outdated:
cargo outdated
check-all: fmt-check clippy test audit
@echo "All checks passed!"
release-check:
cargo publish --dry-run --all-features
@echo "Release check completed successfully"
dev: fmt clippy test
@echo "Development cycle completed"
ci: fmt-check clippy test doc
@echo "CI simulation completed"