-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathMakefile
More file actions
100 lines (74 loc) · 3.16 KB
/
Copy pathMakefile
File metadata and controls
100 lines (74 loc) · 3.16 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
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
.PHONY: all
all:
@echo "Usage:"
@echo "fmt - run the rust formatter"
@echo "sort - sort TOML dependencies"
@echo "lint - combine fmt+sort"
@echo "check - shallow check of rust code (pre-compile)"
@echo "clippy - run clippy checks"
@echo "doc - doc checks"
@echo "hack - test feature matrix compatibility"
@echo "test - run all unit and doc tests"
@echo "qa - combine lint+check+clippy+doc+hack+test"
@echo "detect-unused-deps - detect unused deps for removal"
@echo "hello-axum - run hello-world example using the Axum framework"
@echo "activity-feed-axum - run activity-feed example using the Axum framework"
@echo "watch-axum - run watch channel example using the Axum framework"
@echo "test-suite-axum - run test-suite example runner using the Axum framework"
@echo "hello-rocket - run hello-world example using the Rocket framework"
@echo "hello-channel-rocket - run hello-world w/ a channel example using the Rocket framework"
@echo "test-suite-rocket - run test-suite example runner using the Rocket framework"
@echo "hello-warp - run hello-world example using the Warp framework"
@echo "activity-feed-warp - run activity-feed example using the Warp framework"
@echo "test-suite-warp - run test-suite example runner using the Warp framework"
.PHONY:
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all -- --check
sort:
cargo sort --grouped
sort-check:
cargo sort --workspace --grouped --check
lint: fmt sort
check:
cargo check --all-targets --all-features
clippy:
cargo clippy --all-targets --all-features
doc:
RUSTDOCFLAGS="-D rustdoc::broken-intra-doc-links" cargo doc --all-features --no-deps
hack:
cargo hack check --each-feature --no-dev-deps
test:
cargo test --all-features
qa: lint check clippy doc hack test
detect-unused-deps:
# https://github.com/bnjbvr/cargo-machete
cargo machete --skip-target-dir
update-deps:
cargo upgrades
cargo update
hello-axum:
cargo run --example axum-hello --features axum,tracing
live-reload-axum:
cargo run --example axum-live-reload --features axum,tracing
watch-live-reload-axum:
RUST_LOG=debug cargo watch -x 'run --example axum-live-reload --features axum,tracing'
activity-feed-axum:
cargo run --example axum-activity-feed --features axum,tracing
watch-axum:
cargo run --example axum-watch --features axum
test-suite-axum:
cargo run --example axum-test-suite --features axum,tracing
hello-warp:
cargo run --example warp-hello --features warp,tracing
activity-feed-warp:
cargo run --example warp-activity-feed --features warp,tracing
test-suite-warp:
cargo run --example warp-test-suite --features warp,tracing
hello-rocket:
cargo run --example rocket-hello --features rocket
hello-channel-rocket:
cargo run --example rocket-hello-channel --features rocket
test-suite-rocket:
cargo run --example rocket-test-suite --features rocket