-
-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathjustfile
More file actions
221 lines (155 loc) · 5.26 KB
/
justfile
File metadata and controls
221 lines (155 loc) · 5.26 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
export RUSTFLAGS := "-D warnings"
export RUST_LOG := "debug"
fmt *ARGS:
cargo fmt --all {{ARGS}}
fmt-crate CRATE *ARGS:
cargo fmt --all -p {{CRATE}} {{ARGS}}
sort:
@cargo install cargo-sort
cargo sort --workspace --grouped
lint: fmt sort
deny:
@cargo install cargo-deny
cargo deny --workspace --all-features check
check:
cargo check --workspace --all-targets --all-features
check-crate CRATE:
cargo check -p {{CRATE}} --all-targets --all-features
check-links:
lychee .
clippy:
cargo clippy --workspace --all-targets --all-features
clippy-crate CRATE:
cargo clippy -p {{CRATE}} --all-targets --all-features
clippy-fix *ARGS:
cargo clippy --workspace --all-targets --all-features --fix {{ARGS}}
clippy-fix-crate CRATE *ARGS:
cargo clippy -p {{CRATE}} --all-targets --all-features --fix {{ARGS}}
typos:
typos -w
extra-checks:
{{justfile_directory()}}/scripts/extra-checks.sh
doc:
cargo doc --all-features --no-deps --workspace --exclude rama-cli
just doc-crate rama-cli
doc-crate CRATE:
cargo doc --all-features --no-deps -p {{CRATE}}
hack:
@cargo install cargo-hack
cargo hack check --each-feature --no-dev-deps --workspace
test *ARGS:
@cargo install cargo-nextest --locked
cargo nextest run --all-features --workspace {{ARGS}}
test-doc *ARGS:
cargo test --doc --all-features --workspace {{ARGS}}
test-crate CRATE *ARGS:
@cargo install cargo-nextest --locked
cargo nextest run --all-features -p {{CRATE}} {{ARGS}}
test-doc-crate CRATE *ARGS:
cargo test --doc --all-features -p {{CRATE}} {{ARGS}}
test-spec-h2 *ARGS:
bash rama-http-core/ci/h2spec.sh {{ARGS}}
test-spec: test-spec-h2
test-ignored:
@cargo install cargo-nextest --locked
cargo nextest run --all-features --workspace --run-ignored=only
test-ignored-release:
@cargo install cargo-nextest --locked
cargo nextest run --all-features --release --workspace --run-ignored=only
test-loom:
@cargo install cargo-nextest --locked
RUSTFLAGS="--cfg loom -Dwarnings" cargo nextest run --all-features -p rama-utils
qq: lint check clippy doc extra-checks
qa: qq test test-doc deny
qa-crate CRATE:
just check-crate {{CRATE}}
just clippy-crate {{CRATE}}
just doc-crate {{CRATE}}
just test-crate {{CRATE}}
just test-doc-crate {{CRATE}}
qa-full: qa hack test-ignored test-ignored-release test-loom fuzz-60s check-links
bench-e2e-http-client-server *ARGS:
./scripts/bench/e2e_http_client_server.py {{ARGS}}
clean:
cargo clean
upgrades:
@cargo install cargo-upgrades
cargo upgrades
watch-docs:
@cargo install cargo-watch
cargo watch -x doc
watch-check:
@cargo install cargo-watch
cargo watch -x check -x test
rama +ARGS:
cargo run -p rama-cli -- {{ARGS}}
rama-fp *ARGS:
cargo run -p rama-fp -- {{ARGS}}
watch-rama-fp *ARGS:
@cargo install cargo-watch
cargo watch -x 'run -p rama-fp -- {{ARGS}}'
docker-build-rama-cli:
docker build -f rama-cli/infra/Dockerfile -t glendc/rama-cli:latest .
echo 'glendc/rama-cli:latest ready to use'
browserstack-rama-fp:
cd rama-fp/browserstack && \
(pip install -r requirements.txt || true) && \
python main.py
example NAME:
cargo run -p rama --example {{NAME}}
self-signed-certs CRT KEY:
openssl req -new -newkey rsa:4096 -x509 -sha256 -days 3650 -nodes -out {{CRT}} -keyout {{KEY}}
report-code-lines:
find . -type f -name '*.rs' -exec cat {} + \
| grep -v target | tr -d ' ' | grep -v '^$' | grep -v '^//' \
| wc -l
fuzz-ua:
cargo +nightly fuzz run ua_parse -- -max_len=131072
fuzz-ua-60s:
cargo +nightly fuzz run ua_parse -- -max_len=131072 -max_total_time=60
fuzz-http-headers-x-robots-tag:
cargo +nightly fuzz run http_header_x_robots_tag -- -max_len=131072
fuzz-http-headers-x-robots-tag-60s:
cargo +nightly fuzz run http_header_x_robots_tag -- -max_len=131072 -max_total_time=60
fuzz-h2-main:
# cargo install honggfuzz
cd rama-http-core/tests/h2-fuzz && \
HFUZZ_RUN_ARGS="-t 1" cargo hfuzz run h2-fuzz
fuzz-h2-client:
cargo +nightly fuzz run h2_client
fuzz-h2-hpack:
cargo +nightly fuzz run h2_hpack
fuzz-h2-e2e:
cargo +nightly fuzz run h2_e2e
fuzz-h2-60s:
cargo +nightly fuzz run h2_client -- -max_total_time=60
cargo +nightly fuzz run h2_hpack -- -max_total_time=60
cargo +nightly fuzz run h2_e2e -- -max_total_time=60
fuzz-60s: fuzz-ua-60s fuzz-h2-60s fuzz-http-headers-x-robots-tag-60s
fuzz-full: fuzz-60s fuzz-h2-main
bench:
cargo bench --features=full
vet:
cargo vet
miri:
cargo +nightly miri test
detect-unused-deps:
@cargo install cargo-machete
cargo machete --skip-target-dir --with-metadata
detect-biggest-fn:
cargo bloat --package rama-cli --release -n 10
detect-biggest-crates:
cargo bloat --package rama-cli --release --crates
mdbook-serve:
cd docs/book && mdbook serve
publish *ARGS:
cargo publish --workspace {{ARGS}}
[working-directory: './rama-cli/manifests/winget/Plabayo/Rama/Preview']
@submit-rama-cli-winget-preview:
wingetcreate submit -p 'Plabayo.Rama.Preview version bump' .
update-deps:
cargo upgrades
cargo update
oss-endpoint-healthcheck:
bash rama-fp/infra/scripts/remote-healthcheck.sh