-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathJustfile
More file actions
61 lines (49 loc) · 1.72 KB
/
Copy pathJustfile
File metadata and controls
61 lines (49 loc) · 1.72 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
# Justfile for Rust project using Cargo
#
# Quality bar matches workspace.lints (rust / rustdoc / clippy) in Cargo.toml:
# just all → fmt + clippy (-D warnings) + rustdoc (-D warnings)
# just test → unit + integration + doctests
all: fmt clippy-fix doc-check
# Build the project with all features enabled in release mode
build:
cargo build --workspace --release --all-features
# Check the project for compilation errors without producing binaries
check:
cargo check --workspace --all-features
# Update dependencies to their latest compatible versions
update:
cargo update
# Run the project with all features enabled in release mode
run:
cargo run --release --all-features
# Run all tests with all features enabled (includes doctests)
test:
cargo test --workspace --all-features
# Run benchmarks with all features enabled
bench:
cargo bench --all-features
# Run Clippy linter with nightly toolchain (check only, for CI)
# Uses workspace lints from Cargo.toml
clippy:
cargo +nightly clippy --workspace \
--all-targets \
--all-features \
-- -D warnings
# Run Clippy linter with auto-fix (for development)
clippy-fix:
cargo +nightly clippy --workspace \
--fix \
--all-targets \
--all-features \
--allow-dirty \
--allow-staged \
-- -D warnings
# Format the code using rustfmt with nightly toolchain
fmt:
cargo +nightly fmt
# Generate documentation for all crates and open it in the browser
doc:
cargo +nightly doc --workspace --all-features --no-deps --open
# Rustdoc with warnings denied (missing docs, broken links, rustdoc::* lints)
doc-check:
RUSTDOCFLAGS="-D warnings" cargo +nightly doc --workspace --all-features --no-deps