-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (40 loc) · 1.15 KB
/
Makefile
File metadata and controls
58 lines (40 loc) · 1.15 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
SHELL := /bin/sh
CARGO := cargo
FMT := rustfmt
.PHONY: all build run test perf fmt fmt-check clippy clean help
all: build
build:
$(CARGO) build
run:
$(CARGO) run
# Run all tests
test:
$(CARGO) test --workspace
# Run performance gates (10k module index + search)
perf:
$(CARGO) run -p modules --bin catalog_bench
perf-release:
MOONLIGHT_PERF_INDEX_MS_COLD=1200 MOONLIGHT_PERF_INDEX_MS_WARM=600 MOONLIGHT_PERF_SEARCH_MS=30 \
$(CARGO) run -p modules --bin catalog_bench --release
# Format the codebase in-place
fmt:
$(CARGO) fmt
# Check formatting without modifying files
fmt-check:
$(CARGO) fmt -- --check
# Run clippy with warnings as errors
clippy:
$(CARGO) clippy -- -D warnings
clean:
$(CARGO) clean
help:
@echo "Targets:"
@echo " build Build the workspace"
@echo " run Run the moonlight binary"
@echo " test Run tests"
@echo " perf Run performance gates"
@echo " perf-release Run performance gates (release, tuned for i5/8GB)"
@echo " fmt Format code (rustfmt)"
@echo " fmt-check Check formatting"
@echo " clippy Run clippy (warnings as errors)"
@echo " clean Clean build artifacts"