-
Notifications
You must be signed in to change notification settings - Fork 12
/
.justfile
102 lines (80 loc) · 2.42 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
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
99
100
101
102
alias d := doc
alias l := lint
alias uf := update-flake-dependencies
alias uc := update-cargo-dependencies
alias r := run
alias t := cargo-test
alias b := build
alias rr := run-release
alias cw := cargo-watch
default:
@just --choose
clippy:
cargo clippy --all-targets --all-features
actionlint:
nix develop .#actionlintShell --command actionlint
deny:
cargo deny check
cargo-test:
cargo test
cargo-diet:
nix develop .#lintShell --command cargo diet
cargo-tarpaulin:
nix develop .#lintShell --command cargo tarpaulin --out html --exclude-files "benches/*"
cargo-public-api:
nix develop .#lintShell --command cargo public-api
cargo-diff:
nix develop .#lintShell --command cargo public-api diff
lint:
nix develop .#lintShell --command cargo diet
nix develop .#lintShell --command cargo deny check licenses sources
nix develop .#lintShell --command typos
nix develop .#lintShell --command lychee *.md
nix develop .#fmtShell --command treefmt --fail-on-change
nix develop .#lintShell --command cargo udeps
nix develop .#lintShell --command cargo machete
nix develop .#lintShell --command cargo outdated
nix develop .#lintShell --command taplo lint
nix develop .#actionlintShell --command actionlint --ignore SC2002
cargo check --future-incompat-report
nix flake check
run:
cargo run
build:
cargo build
run-release:
cargo run --release
doc:
cargo doc --open --offline
# Update and then commit the `Cargo.lock` file
update-cargo-dependencies:
cargo update
git add Cargo.lock
git commit Cargo.lock -m "update(cargo): \`Cargo.lock\`"
# Future incompatibility report, run regularly
cargo-future:
cargo check --future-incompat-report
update-flake-dependencies:
nix flake update --commit-lock-file
cargo-watch:
cargo watch -x check -x test -x build
# build all examples
examples:
nix develop --command $SHELL
example_list=$(cargo build --example 2>&1 | sed '1,2d' | awk '{print $1}')
# Build each example
# shellcheck disable=SC2068
for example in ${example_list[@]}; do
cargo build --example "$example"
done
examples-msrv:
set -x
nix develop .#msrvShell --command
rustc --version
cargo --version
example_list=$(cargo build --example 2>&1 | grep -v ":")
# Build each example
# shellcheck disable=SC2068
for example in ${example_list[@]}; do
cargo build --example "$example"
done