-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (36 loc) · 934 Bytes
/
Makefile
File metadata and controls
49 lines (36 loc) · 934 Bytes
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
.PHONY: dev dev-ui dev-server build build-ui build-server run check test lint fmt clean
# Development — run UI dev server + Rust backend concurrently
dev:
@echo "Starting RustMail in dev mode..."
@$(MAKE) -j2 dev-ui dev-server
dev-ui:
cd ui && pnpm dev
dev-server:
cargo watch -x 'run -- --db-path ./dev.db --http-port 8025 --smtp-port 1025'
dev-tui:
cargo run -- tui
# Production build — UI first, then Rust binary with embedded assets
build: build-ui build-server
build-ui:
cd ui && pnpm install --frozen-lockfile && pnpm build
build-server:
cargo build --release
# Run the production binary
run: build
./target/release/rustmail
# Quality checks
check:
cargo check
cd ui && pnpm exec tsc -b
test:
cargo test
lint:
cargo clippy --all-targets -- -D warnings
cd ui && pnpm exec tsc -b
fmt:
cargo fmt
cd ui && pnpm exec prettier --write src/
# Cleanup
clean:
cargo clean
rm -rf ui/dist ui/node_modules