forked from faiyaz26/codelane
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
120 lines (97 loc) · 3.01 KB
/
Makefile
File metadata and controls
120 lines (97 loc) · 3.01 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
.PHONY: dev build clean install check test fmt lint release help
# Default target
help:
@echo "Codelane Build Commands"
@echo "======================="
@echo ""
@echo "Development:"
@echo " make dev - Start development server (Tauri + SolidJS)"
@echo " make frontend - Run frontend only (Vite)"
@echo " make remote-app - Run remote desktop webapp (Vite)"
@echo ""
@echo "Building:"
@echo " make build - Build release binary"
@echo " make release - Build optimized release"
@echo ""
@echo "Code Quality:"
@echo " make check - Run cargo check"
@echo " make test - Run all tests"
@echo " make fmt - Format code with rustfmt"
@echo " make lint - Run clippy lints"
@echo ""
@echo "Performance:"
@echo " make bench - Run all benchmarks"
@echo " make bench-quick - Run quick benchmarks (smaller sample size)"
@echo " make profile - Profile and analyze bundle size"
@echo " make perf-report - Generate complete performance report"
@echo ""
@echo "Maintenance:"
@echo " make clean - Clean build artifacts"
@echo " make install - Install required tools"
# Development
dev:
@echo "Cleaning up port 1420..."
@-lsof -ti:1420 2>/dev/null | xargs kill -9 2>/dev/null || true
pnpm tauri dev --features devtools
frontend:
cd frontend && pnpm dev
remote-app:
cd extensions/remote-desktop/webapp && pnpm dev
# Building
build:
pnpm build
release:
pnpm tauri build
# Code Quality
check:
cargo check --workspace
test:
cargo test --workspace
fmt:
cargo fmt --all
lint:
cargo clippy --workspace -- -D warnings
# Maintenance
clean:
cargo clean
rm -rf frontend/dist/
rm -rf frontend/node_modules/
rm -rf src-tauri/target/
rm -rf node_modules/
install:
@echo "Installing dependencies..."
pnpm install
@echo "Installation complete!"
# Performance & Benchmarking
bench:
@echo "Running comprehensive benchmarks..."
cargo bench --package codelane-benchmarks
@echo "\nBenchmark results available in: target/criterion/report/index.html"
bench-quick:
@echo "Running quick benchmarks..."
cargo bench --package codelane-benchmarks -- --sample-size 10
bench-terminal:
cargo bench --package codelane-benchmarks --bench terminal_benchmarks
bench-git:
cargo bench --package codelane-benchmarks --bench git_benchmarks
bench-ipc:
cargo bench --package codelane-benchmarks --bench ipc_benchmarks
bench-file:
cargo bench --package codelane-benchmarks --bench file_operations
profile:
@echo "Building and analyzing bundle size..."
cd frontend && pnpm build
@echo "\nBundle analysis:"
@du -sh frontend/dist/*
@echo "\nDetailed size breakdown:"
@find frontend/dist -type f -exec ls -lh {} \; | awk '{print $$5 "\t" $$9}' | sort -hr
perf-report:
@echo "Generating comprehensive performance report..."
@./scripts/perf-report.sh
# Platform-specific builds
build-macos:
pnpm tauri build --target universal-apple-darwin
build-linux:
pnpm tauri build --target x86_64-unknown-linux-gnu
build-windows:
pnpm tauri build --target x86_64-pc-windows-msvc