-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
60 lines (46 loc) · 1.52 KB
/
Copy pathjustfile
File metadata and controls
60 lines (46 loc) · 1.52 KB
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
# Prefer the flake-pinned toolchain: wrap cargo in `nix develop` when Nix is
# available, unless already inside the dev shell. Opt out: `just --set wrap ""`.
have_nix := `command -v nix >/dev/null 2>&1 && echo true || echo false`
wrap := if env("IN_NIX_SHELL", "") != "" { "" } else if have_nix == "true" { "nix develop --command " } else { "" }
# List available recipes
default:
@just --list
# Compile the project, optimized by default; `just build dev` for a debug build
build profile="release":
{{wrap}}cargo build --profile {{profile}}
# Type-check without producing a binary
check:
{{wrap}}cargo check
# Run the test suite
test:
{{wrap}}cargo test
# Run clippy with this project's strict lint set
lint:
{{wrap}}cargo clippy -- -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used
# Auto-apply clippy fixes (allows a dirty working tree)
lint-fix:
{{wrap}}cargo clippy --allow-dirty --fix -- -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used
# Format Rust code
fmt:
{{wrap}}cargo fmt
# Watch files and re-check on change (bacon)
watch:
{{wrap}}bacon
# Build and run the TUI
run:
{{wrap}}cargo run
# Enter the Nix dev shell
shell:
nix develop
# Build the release package via the flake
nix-build:
nix build
# Format Nix files with the flake's formatter
nix-fmt:
nix fmt
# Check the flake (evaluates outputs and builds the package)
nix-check:
nix flake check
# Update flake inputs and commit the new lock file
nix-update:
nix flake update --commit-lock-file