-
Notifications
You must be signed in to change notification settings - Fork 0
/
.justfile
106 lines (83 loc) · 2.39 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
103
104
105
106
alias d := doc
alias l := lint
alias f := format
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 .#full --command actionlint
deny:
cargo deny check
cargo-test:
cargo test
cargo-diet:
nix develop .#full --command cargo diet
cargo-mutants:
nix develop .#full --command cargo mutants
cargo-tarpaulin:
nix develop .#full --command cargo tarpaulin --out html --exclude-files "benches/*"
cargo-diff:
nix develop .#full --command cargo public-api diff
format:
nix fmt
lint:
-nix develop .#full --command cargo diet
-nix develop .#full --command cargo deny check licenses
-nix develop .#full --command typos
nix develop .#full --command lychee *.md
nix develop .#full --command treefmt --fail-on-change
-nix develop .#full --command cargo udeps
-nix develop .#full --command cargo machete
-nix develop .#full --command cargo outdated
nix develop .#mdShell --command mdsh --frozen
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