-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
73 lines (58 loc) · 2.4 KB
/
justfile
File metadata and controls
73 lines (58 loc) · 2.4 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
# ┌───────────────────────────────────────────────────────────────┐
# │ Justfile for gitpushup │
# │ │
# │ Commands: │
# │ just → show this help message │
# └───────────────────────────────────────────────────────────────┘
# set shell := ["bash", "-euo", "pipefail"]
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
set dotenv-load := true
# Default recipe (runs when you just type `just`)
default: help
# Show this help message
help:
@echo "Available commands:"
@echo " just → show this help"
@echo " just build / b → watch + build"
@echo " just run / r → watch + run"
@echo " just test → cargo test"
@echo " just clean → cargo clean"
@echo " just cache → clear cargo cache"
@echo " just release → build + install --release"
@echo " just layout → zellij rust layout"
@echo ""
# ─── Build & Development ─────────────────────────────────────────
# Watch + build (continuous)
build:
cargo watch -c -w src/ -x "build --color=always"
# Watch + run (continuous)
run:
cargo watch -c -w src/ -x "run --color=always"
# Shortcuts
b: build
r: run
# Run tests
test:
cargo test -- --nocapture
# Clean build artifacts
clean:
cargo clean
# Remove cargo cache directories
cache:
cargo-cache --remove-dir all
# Build and install release version locally
release:
cargo build --release
cargo install --path . --locked
# ─── Tools & Session ─────────────────────────────────────────────
# Start zellij with rust project layout
layout:
zellij --layout rust-layout.kdl
# Quick cargo fmt + clippy
lint:
cargo fmt --all
cargo clippy --all-targets -- -D warnings
# Update dependencies and clean cache
update:
cargo update
just cache