-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
94 lines (71 loc) · 2.51 KB
/
justfile
File metadata and controls
94 lines (71 loc) · 2.51 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
86
87
88
89
90
91
92
93
94
# justfile for crashpad-rs
# Cross-platform command runner (replacement for Makefile)
# Use PowerShell on Windows
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]
# Default recipe - show available commands
default:
@just --list
# Clean all build artifacts and caches
clean:
cargo clean
{{ if os() == "windows" { "if (Test-Path target) { Remove-Item -Recurse -Force target }; if (Test-Path $env:LOCALAPPDATA\\crashpad-rs) { Remove-Item -Recurse -Force $env:LOCALAPPDATA\\crashpad-rs }" } else { "rm -rf target ~/.cache/crashpad-rs" } }}
# Build the project (debug mode)
build:
cargo build
# Build in release mode
build-release:
cargo build --release
# Run tests
test:
cargo test --lib
# Run tests with nextest for better isolation
test-nextest:
cargo nextest run
# Package the crates for distribution
dist:
cargo xtask dist
# Install development tools (just, nextest, ndk)
install-tools:
cargo xtask install-tools
# Update submodules to match Crashpad's DEPS
update-deps:
cargo xtask update-deps
# Create symlinks for Crashpad dependencies
symlink:
cargo xtask symlink
# Build prebuilt package for current platform
prebuilt:
cargo xtask build-prebuilt
# Build prebuilt package for specific target
prebuilt-target target:
cargo xtask build-prebuilt --target {{target}}
# Build and test with prebuilt feature
test-prebuilt:
cargo build --package crashpad-rs-sys --features prebuilt --no-default-features
cargo test --package crashpad-rs-sys --features prebuilt --no-default-features
# Format code
fmt:
cargo fmt --all
# Run clippy lints
clippy:
cargo clippy --all-targets --all-features -- -D warnings
# Check everything (format, clippy, build, test)
check: fmt clippy build test
# Build for Android (requires cargo-ndk)
android-build target="arm64-v8a":
cargo ndk -t {{target}} build --package crashpad-rs-sys
# Build for iOS
ios-build:
cargo build --target aarch64-apple-ios
# Build for iOS simulator
ios-sim-build:
cargo build --target aarch64-apple-ios-sim
# Run example
run-example:
cargo run --example crashpad_test_cli
# Build documentation
doc:
cargo doc --no-deps --open
# Show build output directory for debugging
show-out-dir:
{{ if os() == "windows" { "Get-ChildItem target\\*\\build\\crashpad-rs-sys-*\\out -ErrorAction SilentlyContinue | Select-Object FullName" } else { "ls -la target/debug/build/crashpad-rs-sys-*/out 2>/dev/null || ls -la target/release/build/crashpad-rs-sys-*/out 2>/dev/null || echo 'No build output found'" } }}