-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
76 lines (59 loc) · 1.3 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
# List recipes
list:
@just --list --unsorted
# good to run before committing changes
all: test format clippy
# Run check
check:
cargo check
# Run benchmarks (then open target/criterion/report/index.html)
bench:
cargo bench
# Run tests
test:
cargo test
# Run tests with --nocapture
test-nocapture *args='':
cargo test -- --nocapture {{args}}
# Run espclient (e.g.: just run --help)
run *args='':
cargo run -- {{ args }}
# List git tags
tags:
git tag -l | sort -V | tail
# Create and push git tag
tag-and-push:
#!/usr/bin/env bash
version=$(cat Cargo.toml | grep version | head -1 | cut -d\" -f2)
echo "tagging and pushing v${version}"
git tag v${version}
git push origin v${version}
# Clean
clean:
cargo clean
# Format source code
format:
cargo fmt
# Run clippy
clippy:
cargo clippy --no-deps -- -D warnings
# Build release
build:
cargo build --release
# Build release with RUSTFLAGS="-C target-cpu=native"
release-native:
RUSTFLAGS="-C target-cpu=native" cargo build --release
# Install locally
install: release-native
cargo install --path .
# (cargo install --locked cargo-outdated)
# Show outdated dependencies
outdated:
cargo outdated --root-deps-only
# (cargo install --locked cargo-udeps)
# Find unused dependencies
udeps:
cargo +nightly udeps
# cargo update
update:
cargo update