-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
justfile
135 lines (98 loc) · 3.11 KB
/
justfile
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
fmt:
cargo fmt --all
sort:
cargo sort --workspace --grouped
lint: fmt sort
check:
cargo check --workspace --all-targets --all-features
clippy:
cargo clippy --workspace --all-targets --all-features
clippy-fix:
cargo clippy --fix
typos:
typos -w
doc:
RUSTDOCFLAGS="-D rustdoc::broken-intra-doc-links" cargo doc --all-features --no-deps
doc-open:
RUSTDOCFLAGS="-D rustdoc::broken-intra-doc-links" cargo doc --all-features --no-deps --open
hack:
cargo hack check --each-feature --no-dev-deps --workspace
test:
cargo test --all-features --workspace
test-ignored:
cargo test --features=cli,telemetry,compression,http-full,proxy-full,tcp,rustls --workspace -- --ignored
qa: lint check clippy doc test
qa-full: lint check clippy doc hack test test-ignored fuzz-60s
upgrades:
cargo upgrades
watch-docs:
cargo watch -x doc
watch-check:
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:
RUST_LOG=debug cargo watch -x 'run -p rama-fp -- {{ARGS}}'
docker-build-rama-fp:
docker build -f rama-fp/infra/Dockerfile -t glendc/rama-fp:latest .
docker-push-rama-fp: docker-build-rama-fp
docker push glendc/rama-fp:latest
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:
cargo +nightly fuzz run ua_parse -- -max_len=131072
fuzz-60s:
cargo +nightly fuzz run ua_parse -- -max_len=131072 -max_total_time=60
bench:
cargo bench
vet:
cargo vet
miri:
cargo +nightly miri test
detect-unused-deps:
cargo machete --skip-target-dir
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
rama-cli-release-build TARGET:
cargo build -p rama-cli --bin rama --release --target {{TARGET}}
VERSION="$(cat Cargo.toml | grep -E '^version = "' | cut -d\" -f2)" && \
cd target/{{TARGET}}/release && \
tar -czf rama-cli-${VERSION}-{{TARGET}}.tar.gz rama && \
shasum -a 256 rama-cli-${VERSION}-{{TARGET}}.tar.gz > rama-cli-${VERSION}-{{TARGET}}.tar.gz.sha256
rama-cli-release-build-all:
just rama-cli-release-build x86_64-apple-darwin
just rama-cli-release-build aarch64-apple-darwin
publish:
cargo publish -p rama-error
cargo publish -p rama-macros
cargo publish -p rama-utils
cargo publish -p rama-core
cargo publish -p rama-http-types
cargo publish -p rama-net
cargo publish -p rama-ua
cargo publish -p rama-dns
cargo publish -p rama-tcp
cargo publish -p rama-tls
cargo publish -p rama-http-backend
cargo publish -p rama-http
cargo publish -p rama-haproxy
cargo publish -p rama-proxy
cargo publish -p rama-udp
cargo publish -p rama-socks5
cargo publish -p rama