.PHONY: help test build fmt clippy clean all check bench
help:
@echo 'Usage: make [target]'
@echo ''
@echo 'Available targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-15s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
all: fmt clippy test
build:
cargo build --all-features
test:
cargo test --all-features
test-unit:
cargo test --lib
test-integration:
cargo test --test integration_tests -- --test-threads=1
test-stress:
cargo test --test stress_tests -- --ignored --test-threads=1
test-locks:
cargo test --test lock_tests -- --test-threads=1
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all -- --check
clippy:
cargo clippy --all-targets --all-features -- -D warnings
clippy-fix:
cargo clippy --fix --all-targets --all-features -- -D warnings
check: fmt-check clippy
clean:
cargo clean
clean-all: clean
cargo clean
rm -rf gun_data/*
bench:
cargo bench
doc:
cargo doc --all-features --open
audit:
cargo audit
machete:
cargo install cargo-machete --locked || true
cargo machete
examples:
cargo build --examples
@echo "Examples built. Run with: cargo run --example <name>"
server:
cargo build --bin gun-server --release
run-server:
cargo run --bin gun-server
ci: fmt-check clippy build test