-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJustfile
More file actions
98 lines (75 loc) · 2.16 KB
/
Justfile
File metadata and controls
98 lines (75 loc) · 2.16 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
set positional-arguments
alias t := test
alias f := fix
alias b := build
alias c := clean
# Default to display help menu
default:
@just --list
# Runs all ci checks
ci: fix check lychee
# Performs lychee link checks
lychee:
@command -v lychee >/dev/null 2>&1 || cargo install lychee
lychee --config ./lychee.toml .
# Checks formatting, clippy, and tests
check: check-format check-clippy test
# Fixes formatting and clippy issues
fix: format-fix clippy-fix
# Runs tests across workspace with all features enabled
test:
@command -v cargo-nextest >/dev/null 2>&1 || cargo install cargo-nextest
RUSTFLAGS="-D warnings" cargo nextest run --workspace --all-features
# Checks formatting
check-format:
cargo +nightly fmt --all -- --check
# Fixes formatting issues
format-fix:
cargo fix --allow-dirty --allow-staged
cargo +nightly fmt --all
# Checks clippy
check-clippy:
cargo clippy --all-targets -- -D warnings
# Fixes clippy issues
clippy-fix:
cargo clippy --all-targets --fix --allow-dirty --allow-staged
# Builds the workspace with release
build:
cargo build --release
# Builds all targets in debug mode
build-all-targets:
cargo build --all-targets
# Builds with maximum performance
build-maxperf:
cargo build --profile maxperf
# Builds the roxy binary
build-roxy:
cargo build --bin roxy
# Cleans the workspace
clean:
cargo clean
# Checks for unused dependencies
check-udeps:
@command -v cargo-udeps >/dev/null 2>&1 || cargo install cargo-udeps
cargo +nightly udeps --workspace --all-features --all-targets
# Watches tests
watch-test:
cargo watch -x test
# Watches checks
watch-check:
cargo watch -x "fmt --all -- --check" -x "clippy --all-targets -- -D warnings" -x test
# Run all benchmarks
bench:
cargo bench --workspace
# Run specific benchmark
bench-one name:
cargo bench --bench {{name}}
# Run fuzz testing (requires cargo-fuzz and nightly Rust)
fuzz target="fuzz_codec_decode" duration="60":
cd fuzz && cargo +nightly fuzz run {{target}} -- -max_total_time={{duration}}
# List fuzz targets
fuzz-list:
cd fuzz && cargo +nightly fuzz list
# Run the full demo example
demo:
cargo run -p roxy-full-demo