-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathjustfile
69 lines (57 loc) · 1.64 KB
/
justfile
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
_default:
@just --list
# Build and run at the debug level in the parent directory
run:
cargo run -- -vvv ..
# Build and run with the help flag
run-help:
cargo run -- -h
# Scan for potential bloat
bloat:
cargo bloat --release
cargo bloat --release --crates
# Build all targets
build:
cargo build --all-targets
# Build release targets
build-release:
cargo build --release
# Run the ci suite
ci:
cargo fmt --all -- --check
cargo check --all-targets --all-features --workspace
cargo clippy --all-targets --all-features --no-deps --workspace -- -D warnings
cargo doc --all --no-deps
cargo test --all-targets --workspace
cargo build --locked --all-targets
# Run update, and baseline lints and checks
prepare:
cargo update
cargo fmt
cargo check --all-targets --all-features --workspace
cargo fix --edition-idioms --allow-dirty --allow-staged
cargo clippy --all-features --all-targets --workspace --no-deps --fix --allow-dirty --allow-staged
# Scan for vulnerabilities
audit: prepare
cargo audit
# Scan for unused dependencies (requires nightly Rust!)
udeps:
cargo udeps
# Check which dependencies are outdated
outdated:
cargo outdated
# Perform a loose benchmark
bench directory=('../'): build-release
hyperfine --warmup 1 'target/release/gfold {{directory}}' 'gfold {{directory}}'
# Peform a release binary size comparison
size: build-release
#!/usr/bin/env bash
checker=gdu
if ! command -v $checker; then
checker=du
fi
$checker -b target/release/gfold
binary=$(which gfold)
if [[ -n "$binary" ]]; then
$checker -b "$(realpath "$binary")"
fi