-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (43 loc) · 1.3 KB
/
Makefile
File metadata and controls
55 lines (43 loc) · 1.3 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
# Makefile for Rust project using Cargo
.PHONY: all build check run test bench clippy clippy-fix fmt doc update
all: fmt clippy-fix
# 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
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 --all-features --no-deps --open