.PHONY: help build develop test clean install-dev run-examples benchmark

help:
	@echo "Blazely - Development Commands"
	@echo ""
	@echo "  make build        - Build the Rust extension (release mode)"
	@echo "  make develop      - Build and install in development mode"
	@echo "  make test         - Run all tests"
	@echo "  make test-python  - Run Python tests only"
	@echo "  make test-rust    - Run Rust tests only"
	@echo "  make clean        - Clean build artifacts"
	@echo "  make install-dev  - Install development dependencies"
	@echo "  make run-hello    - Run hello_world example"
	@echo "  make run-todo     - Run todo_api example"
	@echo "  make run-async    - Run async_example"
	@echo "  make fmt          - Format Rust code"
	@echo "  make lint         - Lint Rust code"
	@echo ""

build:
	maturin build --release

develop:
	maturin develop

install-dev:
	pip install -e ".[dev]"
	pip install maturin

test: test-python test-rust

test-python:
	pytest tests/python/ -v

test-rust:
	cargo test

clean:
	rm -rf target/
	rm -rf dist/
	rm -rf build/
	rm -rf *.egg-info
	find . -type d -name __pycache__ -exec rm -rf {} +
	find . -type f -name "*.pyc" -delete
	find . -type f -name "*.so" -delete

run-hello:
	python examples/hello_world.py

run-todo:
	python examples/todo_api.py

run-async:
	python examples/async_example.py

fmt:
	cargo fmt

lint:
	cargo clippy

check:
	cargo check
