.PHONY: all check test build check-normal check-verbose test-normal test-verbose build-normal build-verbose \
clean fmt fmt-check doc audit outdated help install run release
SILENT_ENV = CARGO_TERM_QUIET=true CARGO_TERM_PROGRESS_WHEN=never CARGO_TERM_VERBOSE=false
all: check test build
@echo ""
@echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@echo "✅ All checks passed successfully!"
@echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
check:
@echo "Checking code formatting..."
@cargo fmt -- --check
@echo "Running clippy..."
@./hack/cargo-smart.sh clippy --all-features --all-targets -- -D warnings
test:
@echo "━━━ Testing anthropic_async ━━━"
@./hack/cargo-smart.sh test --all-features
build:
@echo "━━━ Building anthropic_async ━━━"
@./hack/cargo-smart.sh build
check-normal:
cargo fmt -- --check
cargo clippy --all-targets --all-features -- -D warnings
test-normal:
cargo test --all-features
build-normal:
cargo build
check-verbose:
cargo fmt -- --check
cargo clippy --verbose --all-targets --all-features -- -D warnings
test-verbose:
cargo test --verbose --all-features -- --nocapture
build-verbose:
cargo build --verbose
clean:
cargo clean
fmt:
cargo fmt
fmt-check:
cargo fmt -- --check
doc:
cargo doc --no-deps --open
audit:
cargo audit
outdated:
cargo outdated
release:
cargo build --release
run:
@echo "anthropic-async is a library crate. Run examples instead:"
@echo " cd examples/01-basic-completion && cargo run"
@echo " cd examples/04-model-listing && cargo run"
@echo " cd examples/05-kitchen-sink && cargo run"
install:
cargo install --path .
help:
@echo "Available targets:"
@echo " make check - Run clippy (silent with warnings disabled)"
@echo " make test - Run tests (silent with warnings disabled)"
@echo " make build - Build project (silent with warnings disabled)"
@echo ""
@echo " make check-normal - Run clippy with normal output"
@echo " make test-normal - Run tests with normal output"
@echo " make build-normal - Build project with normal output"
@echo ""
@echo " make check-verbose - Run clippy with verbose output"
@echo " make test-verbose - Run tests with verbose output"
@echo " make build-verbose - Build project with verbose output"
@echo ""
@echo " make clean - Clean build artifacts"
@echo " make fmt - Format code"
@echo " make fmt-check - Check code formatting"
@echo " make doc - Build and open documentation"
@echo ""
@echo " make audit - Check for security vulnerabilities"
@echo " make outdated - Check for outdated dependencies"
@echo " make release - Build release version"
@echo " make run - Show how to run examples"
@echo " make install - Install to cargo registry"
@echo ""
@echo " make all - Run check, test, and build (default)"
@echo " make help - Show this help message"