-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
59 lines (45 loc) · 1004 Bytes
/
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
# 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 h := help
alias r := run
alias t := test
workspace := "--workspace --all-targets"
# default recipe
_: help
# build all artifacts
all: build doc
# compile local package
build *opts:
@cargo build {{workspace}} {{opts}}
# check local package for errors
check:
@cargo check {{workspace}}
# clean build artifacts
clean:
@cargo clean
# apply lints
fix: && fmt
@cargo clippy {{workspace}} --fix --allow-staged
# format source files
fmt:
@cargo +nightly fmt --all
# document source files
doc:
@cargo doc --workspace
# list available recipes
help:
@just --list
# lint source files
lint:
@cargo clippy {{workspace}}
# run executable
run *opts:
@cargo run {{opts}}
# perform tests
test *opts:
@cargo test {{workspace}} {{opts}}