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
# rig-resources task runner.
#
# Install just: https://github.com/casey/just
# brew install just
#
# Run `just` with no args to see the recipe list.
# Show all recipes.
default:
@just --list
# Build all targets with default features.
build:
cargo build --all-targets
# Format check + clippy + tests + msrv + doc.
check: fmt clippy test msrv doc
# Verify code is formatted (does not mutate).
fmt:
cargo fmt --all -- --check
# Clippy across release-relevant feature sets.
clippy:
cargo clippy --all-targets -- -D warnings
cargo clippy --all-targets --features security -- -D warnings
cargo clippy --all-targets --features graph -- -D warnings
cargo clippy --all-targets --features full -- -D warnings
# Tests across release-relevant feature sets.
test:
cargo test --all-targets
cargo test --all-targets --features security
cargo test --all-targets --features graph
cargo test --all-targets --features full
# MSRV gate (Rust 1.88).
msrv:
cargo +1.88 build --all-targets --all-features
# Rustdoc with strict warnings.
doc:
RUSTDOCFLAGS="-D warnings -D rustdoc::broken_intra_doc_links" cargo doc --all-features --no-deps
# Validate the package as it would be uploaded to crates.io.
publish-dry-run:
cargo publish --dry-run
# Preview what release-plz would bump/changelog without changing anything.
release-preview:
release-plz update --dry-run
# Open a release PR locally (writes to a branch). Same thing CI does on push.
release-pr:
release-plz release-pr
# Inspect the next semver bump release-plz would compute from current commits.
next-version:
@release-plz update --dry-run 2>&1 | grep -E "(bumping|no changes|next version)" || true
# Run all checks needed for a PR / commit to main locally.
pr-ready: check publish-dry-run
# Install a git pre-push hook that runs `just pr-ready`.
install-hooks:
#!/usr/bin/env bash
echo '#!/usr/bin/env bash' > .git/hooks/pre-push
echo 'set -e' >> .git/hooks/pre-push
echo 'echo "Running just pr-ready..."' >> .git/hooks/pre-push
echo 'just pr-ready' >> .git/hooks/pre-push
chmod +x .git/hooks/pre-push
echo "pre-push hook installed."