-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
85 lines (70 loc) · 1.56 KB
/
Makefile
File metadata and controls
85 lines (70 loc) · 1.56 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Makefile for qntx/bux — Distributable BoxLite VM Runtime
#
# Workspace members : bux-sys, bux, bux-cli
.PHONY: all
all: pre-commit
# Build the workspace in release mode
.PHONY: build
build:
cargo build --release --all-features
# Quick compilation check without codegen
.PHONY: check
check:
cargo check --all-features
# Run all workspace tests
.PHONY: test
test:
cargo test --all-features
# Run benchmarks
.PHONY: bench
bench:
cargo bench --all-features
# Run the CLI binary
.PHONY: run
run:
cargo run --release --all-features
# Lint with Clippy (auto-fix)
.PHONY: clippy
clippy:
cargo +nightly clippy --fix \
--all-targets \
--all-features \
--allow-dirty \
--allow-staged \
-- -D warnings
# Format workspace code
.PHONY: fmt
fmt:
cargo +nightly fmt
# Check formatting without modifying files
.PHONY: fmt-check
fmt-check:
cargo +nightly fmt --check
# Generate and open documentation
.PHONY: doc
doc:
cargo +nightly doc --all-features --no-deps --open
# Regenerate bux-sys/src/bindings.rs from remote libkrun.h (requires libclang)
# Pipeline: download libkrun.h → bindgen → src/bindings.rs
.PHONY: regenerate-bindings
regenerate-bindings:
BUX_UPDATE_BINDINGS=1 cargo check -p bux-sys --features regenerate
# Update dependencies
.PHONY: update
update:
cargo update
# Check for unused dependencies
.PHONY: udeps
udeps:
cargo +nightly udeps --all-features
# Generate CHANGELOG.md using git-cliff
.PHONY: cliff
cliff:
git cliff --output CHANGELOG.md
.PHONY: pre-commit
pre-commit:
$(MAKE) fmt
$(MAKE) clippy
$(MAKE) test
$(MAKE) build
$(MAKE) cliff