-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
76 lines (58 loc) · 1.2 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
68
69
70
71
72
73
74
75
76
_default:
just --list -u
alias t := test
alias f := format
alias l := lint
alias b := build
alias x := xtask
# Setup development environment
setup:
# Install Rust-related tools
cargo install cargo-binstall
cargo binstall taplo-cli
# Setup Node.js environment
corepack enable
corepack prepare --activate
yarn
# Test all files
test: test-rust test-js
# Test JS files
test-js: build
yarn vitest run
# Test Rust files
test-rust:
cargo test --workspace --no-fail-fast
# Format all files
format: format-toml format-rust format-js
# Format TOML files
format-toml:
taplo format
# Format Rust files
format-rust:
cargo fmt --all
# Format JS files via Biome
format-js:
yarn biome format
# Lint all files
lint: lint-rust lint-js
# Lint JS files via Biome
lint-js:
yarn biome check
# Lint Rust files via Clippy
lint-rust:
cargo clippy --workspace
# Typechecking with TSC
typecheck:
tsc --noEmit
# Build as release mode
build:
yarn workspaces foreach -Apt run build
# Build as debug mode
build-debug:
yarn workspaces foreach -Apt run build:debug
# Run benchmarks
benchmark: build
yarn workspaces foreach -A --include='@benchmark/*' run bench
# Run xtask
xtask *ARGS:
yarn xtask {{ARGS}}