-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
90 lines (72 loc) · 2.23 KB
/
Copy pathMakefile
File metadata and controls
90 lines (72 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# forjar - Rust CLI Binary Makefile
# Generated by Pragmatic AI Labs MCP Agent Toolkit (pmat)
.PHONY: all check format lint test test-fast bench bench-update build build-release run clean install help coverage audit deny doc-test
# Default target: run all checks and build
all: format check lint test build
# Type check the code
check:
cargo check
# Format code with rustfmt
format:
cargo fmt --all
# Lint with clippy
lint:
cargo clippy --all-targets -- -D warnings
# Run tests
test:
cargo test
# Run fast tests (lib only, no integration tests)
test-fast:
cargo test --lib
# Run benchmarks (Criterion, 95% confidence intervals)
bench:
cargo bench
# Run benchmarks and update benchmarks/RESULTS.md
bench-update:
cargo run --release --bin forjar -- bench --iterations 1000 --json \
| python3 scripts/bench_update.py > benchmarks/RESULTS.md
# Build debug binary
build:
cargo build
# Build release binary
build-release:
cargo build --release
# Run the application
run:
cargo run
# Clean build artifacts
clean:
cargo clean
# Install the binary to cargo bin directory
install: build-release
cargo install --path .
# Run coverage analysis
coverage:
cargo llvm-cov --summary-only --fail-under-lines 95
# Run security audit
audit:
cargo audit
cargo deny check
# Run doc tests
doc-test:
cargo test --doc
# Show help
help:
@echo "forjar - Available targets:"
@echo " all - Run format, check, lint, test, and build"
@echo " check - Type check the code"
@echo " format - Format code with rustfmt"
@echo " lint - Run clippy linter"
@echo " test - Run tests"
@echo " test-fast - Run fast tests (lib only)"
@echo " bench - Run benchmarks"
@echo " bench-update - Run benchmarks and update benchmarks/RESULTS.md"
@echo " build - Build debug binary"
@echo " build-release - Build optimized release binary"
@echo " run - Run the application"
@echo " clean - Remove build artifacts"
@echo " install - Install the binary"
@echo " coverage - Run coverage analysis (95% minimum)"
@echo " audit - Run security audit (cargo-audit + cargo-deny)"
@echo " doc-test - Run documentation tests"
@echo " help - Show this help message"