-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
67 lines (51 loc) · 1.18 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
# File: Justfile
# Author: Zakhary Kaplan <https://zakhary.dev>
# Created: 27 Apr 2022
# SPDX-License-Identifier: MIT OR Apache-2.0
# Vim: set fdl=0 fdm=marker ft=make:
alias b := build
alias c := check
alias r := run
alias t := test
# default recipe
_: help
# build all artifacts
all: build doc release
# compile local package
build: dev
# check local package for errors
check:
@cargo check --workspace --all-targets
# clean build artifacts
clean:
@cargo clean
# build `dev` profile
dev:
@cargo build --all-targets
# apply lints
fix: && fmt
@cargo clippy --workspace --fix --allow-dirty --allow-staged
# format source files
fmt:
@cargo +nightly fmt
# document source files
doc:
@cargo doc
# list available recipes
help:
@just --list
# lint source files
lint:
@cargo clippy --workspace --all-targets
# lint pedantically
pedantic:
@cargo clippy --workspace --all-targets -- --warn=clippy::pedantic
# build `release` profile
release:
@cargo build --all-targets --release
# run binary
run package *opts:
@cargo run --release -p {{ package }} -- {{ opts }}
# perform tests
test *opts:
@cargo test --workspace -- {{ opts }}