-
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathJustfile
More file actions
65 lines (49 loc) · 1.5 KB
/
Copy pathJustfile
File metadata and controls
65 lines (49 loc) · 1.5 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
# justfile for Rust project using Cargo
default: all
all: fmt clippy-fix deny test doc-check
list:
@just --list
build:
cargo build --workspace --release --all-features
check:
cargo check --workspace --all-features
update:
cargo update
test:
cargo test --workspace --all-features
bench:
cargo bench --all-features
# Prerequisites: `rustup toolchain install nightly --component clippy`
clippy:
cargo +nightly clippy --workspace \
--all-targets \
--all-features \
-- -D warnings
# Prerequisites: `rustup toolchain install nightly --component clippy`
clippy-fix:
cargo +nightly clippy --workspace \
--fix \
--all-targets \
--all-features \
--allow-dirty \
--allow-staged \
-- -D warnings
# Nightly rustfmt provides import grouping.
# Prerequisites: `rustup toolchain install nightly --component rustfmt`
fmt:
cargo +nightly fmt --all -- \
--config unstable_features=true,group_imports=StdExternalCrate,imports_granularity=Module
fmt-check:
cargo +nightly fmt --all -- \
--check \
--config unstable_features=true,group_imports=StdExternalCrate,imports_granularity=Module
# Prerequisites: `rustup toolchain install nightly`
doc:
cargo +nightly doc --workspace --all-features --no-deps --open
doc-check:
RUSTDOCFLAGS="-D warnings" cargo +nightly doc --workspace --all-features --no-deps
# Prerequisites: `cargo install cargo-deny`
deny:
cargo deny check
clean:
cargo clean