-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
54 lines (45 loc) · 1.67 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
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 'cargo run -- cargo-hack && cargo hack check --each-feature --no-dev-deps --verbose --workspace --locked && cargo hack check --feature-powerset --no-dev-deps --verbose --workspace --locked'
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.15.1 --profile=dev && cargo msrv -- cargo check --verbose --locked'