-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.justfile
More file actions
62 lines (51 loc) · 1.27 KB
/
.justfile
File metadata and controls
62 lines (51 loc) · 1.27 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
61
62
# Like GNU `make`, but `just` rustier.
# https://just.systems/
# run `just` from this directory to see available commands
alias b := build
alias i := image
alias r := run
alias db := debug
alias c := clean
alias ch := check
alias f := format
alias d := docs
alias w := wasm
# Default command when 'just' is run without arguments
default:
@just --list
# Build the project
build arch='x86_64':
@echo "Building..."
zig build -Dtarget_arch={{arch}}
# Build the project
image arch='x86_64':
@echo "Building image..."
zig build image -Dtarget_arch={{arch}}
# Run the project
run arch='x86_64':
@echo "Running..."
zig build run -Dtarget_arch={{arch}}
# Debug the project
debug arch='x86_64':
@echo "Debugging..."
zig build debug -Doptimize=Debug -Dtarget_arch={{arch}}
# Remove build artifacts and non-essential files
clean:
@echo "Cleaning..."
@rm -rf .zig-cache zig-out .img qemu.log
# Run code quality tools
check:
@echo "Checking..."
zig build check
# Format the project
format:
@echo "Formatting..."
@zig fmt .
@find . -name "*.nix" -type f -exec nixfmt {} \;
# Generate documentation
docs arch='x86_64':
@echo "Generating documentation..."
zig build docs -Dtarget_arch={{arch}}
# Build the project for WASM
wasm arch='x86_64':
@echo "Building WASM..."