.PHONY: all build test bench lint fmt clean docs examples
all: build test
build:
cargo build --all-features
release:
cargo build --release --all-features
test:
cargo test --all-features
test-verbose:
cargo test --all-features -- --nocapture
test-polyglot:
cargo test --test polyglot -- --ignored --nocapture
bench:
cargo bench --bench zap_vs_mcp
lint:
cargo clippy --all-targets --all-features -- -D warnings
fmt:
cargo fmt
fmt-check:
cargo fmt -- --check
clean:
cargo clean
docs:
cargo doc --no-deps --all-features
@echo "Documentation built at target/doc/hanzo_zap/index.html"
docs-open:
cargo doc --no-deps --all-features --open
example-rust:
cargo run --example rust_agent
example-python:
cd examples/python && python agent.py
example-node:
cd examples/node && npx ts-node agent.ts
example-go:
cd examples/go && go run agent.go
example-ruby:
cd examples/ruby && ruby agent.rb
examples:
@echo "Running Rust example..."
-cargo run --example rust_agent
@echo "\nRunning Python example..."
-cd examples/python && python agent.py
@echo "\nRunning Ruby example..."
-cd examples/ruby && ruby agent.rb
dev: fmt lint test
ci: fmt-check lint test bench
pre-commit: fmt-check lint test
watch:
cargo watch -x test
setup:
cargo install cargo-watch
cargo install cargo-nextest
@echo "Setup complete!"
audit:
cargo audit
update:
cargo update
coverage:
cargo tarpaulin --all-features --out Html
@echo "Coverage report at tarpaulin-report.html"
help:
@echo "ZAP Development Commands"
@echo "========================"
@echo ""
@echo "Build:"
@echo " make build - Build debug"
@echo " make release - Build release"
@echo ""
@echo "Test:"
@echo " make test - Run all tests"
@echo " make test-polyglot - Run polyglot E2E tests"
@echo " make bench - Run benchmarks"
@echo ""
@echo "Quality:"
@echo " make lint - Run clippy"
@echo " make fmt - Format code"
@echo " make dev - Format, lint, test"
@echo ""
@echo "Docs:"
@echo " make docs - Build documentation"
@echo " make docs-open - Build and open docs"
@echo ""
@echo "Examples:"
@echo " make example-rust - Run Rust example"
@echo " make example-python - Run Python example"
@echo " make examples - Run all examples"