feat: initialise workspace — Milestone 1 asset explorer
Three-crate Cargo workspace structured per PROJECT.md spec: - crates/sylpheed-formats — Xbox 360 format parsers (no Bevy) - crates/sylpheed-viewer — Bevy 0.15 asset viewer + egui UI - crates/sylpheed-cli — CLI tools (extract/list/sniff/texture) Milestone 1 features: - XISO disc image reading via xdvdfs 0.8 - XPR2 texture container parsing + Morton de-tiling - D3DFORMAT → wgpu TextureFormat mapping (DXT1/3/5, DXN, ARGB) - Custom Bevy AssetLoader for .xpr files - Orbit camera (LMB orbit, RMB pan, scroll zoom) - egui file browser + RE notes panel - CLI: extract / list / sniff / texture info / texture export - GitHub Actions CI (Linux, macOS, Windows, WASM) - Trunk WASM build config Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
101
justfile
Normal file
101
justfile
Normal file
@@ -0,0 +1,101 @@
|
||||
# Justfile — project-wide build and dev commands
|
||||
# Install with: cargo install just
|
||||
# Usage: just <recipe>
|
||||
|
||||
# Default: list all recipes
|
||||
default:
|
||||
@just --list
|
||||
|
||||
# ── Setup ──────────────────────────────────────────────────────────────────────
|
||||
|
||||
# Install all required tools
|
||||
setup:
|
||||
@echo "Installing build tools..."
|
||||
cargo install trunk # WASM bundler
|
||||
cargo install wasm-bindgen-cli
|
||||
rustup target add wasm32-unknown-unknown
|
||||
@echo "All tools installed!"
|
||||
|
||||
# ── Native builds ──────────────────────────────────────────────────────────────
|
||||
|
||||
# Run the asset viewer (native, debug)
|
||||
run:
|
||||
cargo run --bin sylpheed-viewer
|
||||
|
||||
# Run with hot-reloading enabled (faster iteration)
|
||||
run-dev:
|
||||
cargo run --bin sylpheed-viewer --features sylpheed-viewer/dev
|
||||
|
||||
# Build native release
|
||||
build-native:
|
||||
cargo build --release --bin sylpheed-viewer
|
||||
|
||||
# Run the CLI
|
||||
cli *ARGS:
|
||||
cargo run --bin sylpheed-cli -- {{ARGS}}
|
||||
|
||||
# ── WASM / Web builds ──────────────────────────────────────────────────────────
|
||||
|
||||
# Start WASM dev server with hot-reload
|
||||
web:
|
||||
trunk serve
|
||||
|
||||
# Build WASM release bundle (output in ./dist/)
|
||||
build-web:
|
||||
trunk build --release
|
||||
|
||||
# ── Extraction shortcuts ───────────────────────────────────────────────────────
|
||||
|
||||
# Extract an ISO to ./assets/ (required before running the viewer)
|
||||
# Usage: just extract path/to/game.iso
|
||||
extract ISO:
|
||||
cargo run --bin sylpheed-cli -- extract {{ISO}} ./assets/
|
||||
@echo "Extraction complete. Run: just run"
|
||||
|
||||
# List files in an ISO
|
||||
# Usage: just list path/to/game.iso
|
||||
list ISO:
|
||||
cargo run --bin sylpheed-cli -- list {{ISO}}
|
||||
|
||||
# Sniff file formats in ./assets/
|
||||
sniff:
|
||||
cargo run --bin sylpheed-cli -- sniff ./assets/
|
||||
|
||||
# Sniff but only show unknown formats (focus RE effort)
|
||||
sniff-unknown:
|
||||
cargo run --bin sylpheed-cli -- sniff ./assets/ --unknown-only
|
||||
|
||||
# ── Testing ────────────────────────────────────────────────────────────────────
|
||||
|
||||
# Run all tests
|
||||
test:
|
||||
cargo test --workspace
|
||||
|
||||
# Run tests including ISO integration tests (requires SYLPHEED_ISO env var)
|
||||
test-integration:
|
||||
SYLPHEED_ISO=./game.iso cargo test --workspace -- --include-ignored
|
||||
|
||||
# ── Code quality ──────────────────────────────────────────────────────────────
|
||||
|
||||
# Format all code
|
||||
fmt:
|
||||
cargo fmt --all
|
||||
|
||||
# Lint
|
||||
lint:
|
||||
cargo clippy --workspace -- -D warnings
|
||||
|
||||
# Check everything compiles (faster than full build)
|
||||
check:
|
||||
cargo check --workspace
|
||||
cargo check --workspace --target wasm32-unknown-unknown
|
||||
|
||||
# ── All platforms CI check ────────────────────────────────────────────────────
|
||||
|
||||
# Full CI: format check + lint + test + WASM compile check
|
||||
ci:
|
||||
cargo fmt --all -- --check
|
||||
cargo clippy --workspace -- -D warnings
|
||||
cargo test --workspace
|
||||
cargo check --target wasm32-unknown-unknown -p sylpheed-viewer
|
||||
@echo "All CI checks passed!"
|
||||
Reference in New Issue
Block a user