-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
58 lines (49 loc) · 1.83 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
default:
just -l
pwd := `pwd`
run +ARGS:
cargo run -- {{ARGS}}
runr +ARGS:
cargo run --release -- {{ARGS}}
fmt:
cargo +nightly fmt
check:
cargo +nightly fmt --check
cargo clippy --all-targets --locked --workspace -- -D warnings
cargo clippy --all-targets --locked --workspace --release -- -D warnings
docker:
docker run -it --rm --pull=always \
-e CARGO_TARGET_DIR=/ptarget \
--mount type=bind,source={{pwd}},target=/project \
--mount type=bind,source=$HOME/.cargo/registry,target=/usr/local/cargo/registry \
-w /project \
rust:latest \
bash
docker-alpine:
docker run -it --rm --pull=always \
-e CARGO_TARGET_DIR=/ptarget \
--mount type=bind,source={{pwd}},target=/project \
--mount type=bind,source=$HOME/.cargo/registry,target=/usr/local/cargo/registry \
-w /project \
rust:alpine \
sh
hack:
docker run -t --rm --pull=always \
-e CARGO_TARGET_DIR=/ptarget \
--mount type=bind,source={{pwd}},target=/project \
--mount type=bind,source=$HOME/.cargo/registry,target=/usr/local/cargo/registry \
-w /project \
rust:latest \
bash -c "curl --proto '=https' --tlsv1.2 -sSf \
https://raw.githubusercontent.com/cargo-prebuilt/cargo-prebuilt/main/scripts/install-cargo-prebuilt.sh | bash \
&& cargo prebuilt cargo-hack --ci \
&& cargo hack check --each-feature --no-dev-deps --verbose --workspace \
&& cargo hack check --feature-powerset --no-dev-deps --verbose --workspace"
msrv:
docker run -t --rm --pull=always \
-e CARGO_TARGET_DIR=/ptarget \
--mount type=bind,source={{pwd}},target=/project \
--mount type=bind,source=$HOME/.cargo/registry,target=/usr/local/cargo/registry \
-w /project \
rust:latest \
bash -c 'cargo install cargo-msrv --version 0.16.0-beta.19 && cargo msrv -- cargo check --verbose --locked'