renacer 0.3.2

Pure Rust system call tracer with source-aware correlation for Rust binaries
Documentation
# Renacer Makefile
# Following bashrs and paiml-mcp-agent-toolkit patterns

.PHONY: help test coverage coverage-html coverage-clean mutants mutants-quick clean build release lint format check

help: ## Show this help message
	@echo "Renacer - Pure Rust strace alternative"
	@echo ""
	@echo "Available targets:"
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "  \033[36m%-20s\033[0m %s\n", $$1, $$2}'

test: ## Run tests (fast, no coverage)
	@echo "๐Ÿงช Running tests..."
	@cargo test --quiet

coverage: ## Generate HTML coverage report and open in browser
	@echo "๐Ÿ“Š Running comprehensive test coverage analysis..."
	@echo "๐Ÿ” Checking for cargo-llvm-cov..."
	@which cargo-llvm-cov > /dev/null 2>&1 || (echo "๐Ÿ“ฆ Installing cargo-llvm-cov..." && cargo install cargo-llvm-cov --locked)
	@if ! rustup component list --installed | grep -q llvm-tools-preview; then \
		echo "๐Ÿ“ฆ Installing llvm-tools-preview..."; \
		rustup component add llvm-tools-preview; \
	fi
	@echo "๐Ÿงน Cleaning old coverage data..."
	@cargo llvm-cov clean --workspace
	@mkdir -p target/coverage/html
	@echo "โš™๏ธ  Temporarily disabling global cargo config (mold/custom linker breaks coverage)..."
	@test -f ~/.cargo/config.toml && mv ~/.cargo/config.toml ~/.cargo/config.toml.cov-backup || true
	@echo "๐Ÿงช Phase 1: Running tests with instrumentation (no report)..."
	@cargo llvm-cov --no-report test --workspace --all-features || true
	@echo "๐Ÿ“Š Phase 2: Generating coverage reports..."
	@cargo llvm-cov report --html --output-dir target/coverage/html || echo "โš ๏ธ  No coverage data generated"
	@cargo llvm-cov report --lcov --output-path target/coverage/lcov.info || echo "โš ๏ธ  LCOV generation skipped"
	@echo "โš™๏ธ  Restoring global cargo config..."
	@test -f ~/.cargo/config.toml.cov-backup && mv ~/.cargo/config.toml.cov-backup ~/.cargo/config.toml || true
	@echo ""
	@echo "๐Ÿ“Š Coverage Summary:"
	@cargo llvm-cov report --summary-only || echo "Run 'cargo test' to generate coverage data first"
	@echo ""
	@echo "๐Ÿ“Š Coverage reports generated:"
	@echo "- HTML: target/coverage/html/index.html"
	@echo "- LCOV: target/coverage/lcov.info"
	@echo ""
	@xdg-open target/coverage/html/index.html 2>/dev/null || \
		open target/coverage/html/index.html 2>/dev/null || \
		echo "โœ… Open target/coverage/html/index.html in your browser"

coverage-html: coverage ## Alias for coverage

coverage-clean: ## Clean coverage artifacts
	@echo "๐Ÿงน Cleaning coverage artifacts..."
	@if command -v cargo-llvm-cov >/dev/null 2>&1; then \
		cargo llvm-cov clean --workspace; \
		echo "โœ… Coverage artifacts cleaned!"; \
	else \
		echo "โš ๏ธ  cargo-llvm-cov not installed, skipping clean."; \
	fi

build: ## Build debug binary
	@echo "๐Ÿ”จ Building debug binary..."
	@cargo build

release: ## Build optimized release binary
	@echo "๐Ÿš€ Building release binary..."
	@cargo build --release
	@echo "โœ… Release binary: target/release/renacer"

lint: ## Run clippy linter
	@echo "๐Ÿ” Running clippy..."
	@cargo clippy -- -D warnings

format: ## Format code with rustfmt
	@echo "๐Ÿ“ Formatting code..."
	@cargo fmt

check: ## Type check without building
	@echo "โœ… Type checking..."
	@cargo check --all-targets --all-features

clean: ## Clean build artifacts
	@echo "๐Ÿงน Cleaning build artifacts..."
	@cargo clean
	@rm -rf target/coverage
	@echo "โœ… Clean completed!"

benchmark: ## Run performance benchmarks
	@echo "๐Ÿ“Š Running benchmarks..."
	@cargo test --test benchmark_vs_strace -- --nocapture --test-threads=1

mutants: ## Run mutation testing (full analysis)
	@echo "๐Ÿงฌ Running mutation testing..."
	@echo "๐Ÿ” Checking for cargo-mutants..."
	@which cargo-mutants > /dev/null 2>&1 || (echo "๐Ÿ“ฆ Installing cargo-mutants..." && cargo install cargo-mutants --locked)
	@echo "๐Ÿงฌ Running cargo-mutants (this may take several minutes)..."
	@cargo mutants --output target/mutants.out || echo "โš ๏ธ  Some mutants survived"
	@echo ""
	@echo "๐Ÿ“Š Mutation Testing Results:"
	@cat target/mutants.out/mutants.out 2>/dev/null || echo "Check target/mutants.out/ for detailed results"

mutants-quick: ## Run mutation testing (quick check on changed files only)
	@echo "๐Ÿงฌ Running quick mutation testing..."
	@echo "๐Ÿ” Checking for cargo-mutants..."
	@which cargo-mutants > /dev/null 2>&1 || (echo "๐Ÿ“ฆ Installing cargo-mutants..." && cargo install cargo-mutants --locked)
	@echo "๐Ÿงฌ Running cargo-mutants on uncommitted changes..."
	@cargo mutants --in-diff git:HEAD --output target/mutants-quick.out || echo "โš ๏ธ  Some mutants survived"
	@echo ""
	@echo "๐Ÿ“Š Quick Mutation Testing Results:"
	@cat target/mutants-quick.out/mutants.out 2>/dev/null || echo "Check target/mutants-quick.out/ for detailed results"