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
91
# ThreatFlux Hashing Library Makefile
# Provides consistent build, test, and quality commands across all ThreatFlux libraries
.PHONY: help build test check fmt clippy clean doc bench examples install release pre-commit all
# Default target
all: fmt clippy test build
# Help target
help:
@echo "ThreatFlux Hashing Library - Available targets:"
@echo ""
@echo " Build targets:"
@echo " build - Build the library in debug mode"
@echo " release - Build the library in release mode"
@echo " check - Fast compilation check without optimization"
@echo ""
@echo " Quality targets:"
@echo " fmt - Format code with rustfmt"
@echo " clippy - Run clippy lints"
@echo " test - Run all tests"
@echo " bench - Run benchmarks"
@echo " doc - Generate documentation"
@echo ""
@echo " Maintenance targets:"
@echo " clean - Clean build artifacts"
@echo " install - Install from source"
@echo " examples - Run all examples"
@echo " pre-commit - Run pre-commit checks (fmt + clippy + test)"
@echo ""
@echo " Meta targets:"
@echo " all - Run fmt + clippy + test + build"
@echo " help - Show this help message"
# Build targets
build:
@echo "๐จ Building threatflux-hashing..."
cargo build
release:
@echo "๐ Building threatflux-hashing in release mode..."
cargo build --release
check:
@echo "โ
Checking threatflux-hashing compilation..."
cargo check
# Quality targets
fmt:
@echo "๐จ Formatting threatflux-hashing code..."
cargo fmt
clippy:
@echo "๐ Running clippy on threatflux-hashing..."
cargo clippy -- -D warnings
test:
@echo "๐งช Running threatflux-hashing tests..."
cargo test
bench:
@echo "โก Running threatflux-hashing benchmarks..."
cargo bench
doc:
@echo "๐ Generating threatflux-hashing documentation..."
cargo doc --no-deps --open
# Maintenance targets
clean:
@echo "๐งน Cleaning threatflux-hashing build artifacts..."
cargo clean
install:
@echo "๐ฆ Installing threatflux-hashing..."
cargo install --path .
examples:
@echo "๐ก Running threatflux-hashing examples..."
@for example in $$(cargo run --example 2>&1 | grep -E "^\s+" | awk '{print $$1}'); do \
echo "Running example: $$example"; \
cargo run --example $$example; \
done
# Pre-commit checks
pre-commit: fmt clippy test
@echo "โ
All pre-commit checks passed for threatflux-hashing!"
# Development workflow
dev: fmt clippy test build
@echo "๐ฏ Development cycle complete for threatflux-hashing!"