forked from lambdaclass/stabileo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (45 loc) · 1.94 KB
/
Makefile
File metadata and controls
67 lines (45 loc) · 1.94 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
.PHONY: dev dev-backend dev-web wasm build build-backend build-web \
test test-engine test-backend test-web \
docker-build docker-up docker-down \
clean fmt check
# ── Development ──────────────────────────────────────────────
## Start everything: backend + web dev server (requires .env in backend/)
dev:
@echo "Starting backend and web dev server..."
$(MAKE) -j2 dev-backend dev-web
dev-backend:
cd backend && cargo run
dev-web: wasm
cd web && npm install && npm run dev
## Build WASM engine for the frontend
wasm:
cd engine && wasm-pack build --target web --out-dir ../web/src/lib/wasm --no-opt
# ── Build ────────────────────────────────────────────────────
build: build-backend build-web
build-backend:
cargo build -p dedaliano-backend --release
build-web: wasm
cd web && npm install && npm run build
# ── Test ─────────────────────────────────────────────────────
test: test-engine test-backend test-web
test-engine:
cargo test -p dedaliano-engine
test-backend:
cargo test -p dedaliano-backend
test-web:
cd web && npm install && npx vitest run
# ── Docker ───────────────────────────────────────────────────
docker-build:
docker compose build
docker-up:
docker compose up -d
docker-down:
docker compose down
# ── Utilities ────────────────────────────────────────────────
fmt:
cargo fmt --all
check:
cargo clippy --workspace -- -D warnings
clean:
cargo clean
rm -rf web/dist web/node_modules/.vite