.PHONY: help test test-all test-stdlib test-ui test-game test-integration \
test-quick test-verbose clippy fmt check build build-all \
example-ui example-game example-http example-physics example-audio \
test-examples clean doc
help:
@echo "Windjammer v0.34.0 - Development Commands"
@echo ""
@echo "Testing:"
@echo " make test - Run all tests"
@echo " make test-quick - Quick test (stdlib smoke test only)"
@echo " make test-stdlib - Test standard library"
@echo " make test-ui - Test UI framework"
@echo " make test-game - Test game engine"
@echo " make test-integration - Integration tests only"
@echo " make test-verbose - Run tests with output"
@echo " make test-examples - Run all example tests"
@echo ""
@echo "Code Quality:"
@echo " make check - Run all checks (fmt + clippy + test)"
@echo " make fmt - Format code"
@echo " make clippy - Run clippy linter"
@echo ""
@echo "Building:"
@echo " make build - Build main compiler"
@echo " make build-all - Build all crates"
@echo " make doc - Generate documentation"
@echo ""
@echo "Examples:"
@echo " make example-ui - Run UI counter demo"
@echo " make example-game - Run game app test"
@echo " make example-http - Run HTTP server test"
@echo " make example-physics - Run physics test"
@echo " make example-audio - Run audio test"
@echo ""
@echo "Cleanup:"
@echo " make clean - Clean build artifacts"
test:
@echo "๐งช Running all tests..."
cargo test --all-features --workspace
test-verbose:
@echo "๐งช Running all tests (verbose)..."
cargo test --all-features --workspace -- --nocapture
test-quick:
@echo "๐งช Quick smoke test..."
cargo test -p windjammer-runtime --test smoke_test
test-stdlib:
@echo "๐งช Testing standard library..."
cargo test -p windjammer-runtime --all-features
test-stdlib-integration:
@echo "๐งช Testing stdlib integration..."
cargo test -p windjammer-runtime --test integration_tests
test-stdlib-smoke:
@echo "๐งช Testing stdlib smoke tests..."
cargo test -p windjammer-runtime --test smoke_test
test-stdlib-http:
@echo "๐งช Testing std::http..."
cargo test -p windjammer-runtime http
test-stdlib-db:
@echo "๐งช Testing std::db..."
cargo test -p windjammer-runtime db
test-stdlib-json:
@echo "๐งช Testing std::json..."
cargo test -p windjammer-runtime json
test-stdlib-fs:
@echo "๐งช Testing std::fs..."
cargo test -p windjammer-runtime fs
test-ui:
@echo "๐งช Testing UI framework..."
cargo test -p windjammer-ui --all-features
test-ui-vdom:
@echo "๐งช Testing UI VDOM..."
cargo test -p windjammer-ui vdom
test-ui-reactivity:
@echo "๐งช Testing UI reactivity..."
cargo test -p windjammer-ui reactivity
test-ui-renderer:
@echo "๐งช Testing UI renderer..."
cargo test -p windjammer-ui simple_renderer
test-game:
@echo "๐งช Testing game engine..."
cargo test -p windjammer-game --all-features
test-game-ecs:
@echo "๐งช Testing game ECS..."
cargo test -p windjammer-game ecs
test-game-physics:
@echo "๐งช Testing game physics..."
cargo test -p windjammer-game physics --features 3d
test-game-rendering:
@echo "๐งช Testing game rendering..."
cargo test -p windjammer-game rendering
test-game-audio:
@echo "๐งช Testing game audio..."
cargo test -p windjammer-game audio --features audio
test-compiler:
@echo "๐งช Testing compiler..."
cargo test -p windjammer
test-lsp:
@echo "๐งช Testing LSP..."
cargo test -p windjammer-lsp
test-mcp:
@echo "๐งช Testing MCP..."
cargo test -p windjammer-mcp
test-integration:
@echo "๐งช Running integration tests..."
cargo test --test '*' --workspace
check: fmt clippy test
@echo "โ
All checks passed!"
fmt:
@echo "๐ Formatting code..."
cargo fmt --all
fmt-check:
@echo "๐ Checking code formatting..."
cargo fmt --all -- --check
clippy:
@echo "๐ Running clippy..."
cargo clippy --all-features --workspace -- -D warnings
clippy-compiler:
@echo "๐ Clippy: windjammer..."
cargo clippy -p windjammer --all-features -- -D warnings
clippy-lsp:
@echo "๐ Clippy: windjammer-lsp..."
cargo clippy -p windjammer-lsp --all-features -- -D warnings
clippy-mcp:
@echo "๐ Clippy: windjammer-mcp..."
cargo clippy -p windjammer-mcp --all-features -- -D warnings
clippy-ui:
@echo "๐ Clippy: windjammer-ui..."
cargo clippy -p windjammer-ui --all-features -- -D warnings
clippy-game:
@echo "๐ Clippy: windjammer-game..."
cargo clippy -p windjammer-game --all-features -- -D warnings
build:
@echo "๐จ Building compiler..."
cargo build --release
build-all:
@echo "๐จ Building all crates..."
cargo build --all-features --workspace --release
build-debug:
@echo "๐จ Building (debug)..."
cargo build --all-features --workspace
build-examples:
@echo "๐จ Building examples..."
cargo build --examples --all-features --workspace
doc:
@echo "๐ Generating documentation..."
cargo doc --all-features --workspace --no-deps --open
doc-quiet:
@echo "๐ Generating documentation..."
cargo doc --all-features --workspace --no-deps
test-examples: example-ui example-physics example-audio example-game
@echo "โ
All examples completed!"
example-ui:
@echo "๐จ Running UI counter demo..."
cargo run --example counter_test -p windjammer-ui
example-game:
@echo "๐ฎ Running game app test..."
cargo run --example game_app_test -p windjammer-game --features "3d,audio" 2>/dev/null || \
cargo run --example game_app_test -p windjammer-game --features "3d"
example-physics:
@echo "โ๏ธ Running physics test..."
cargo run --example physics_test -p windjammer-game --features 3d
example-audio:
@echo "๐ Running audio test..."
cargo run --example audio_test -p windjammer-game --features audio 2>/dev/null || \
echo "โ ๏ธ Audio feature requires audio hardware"
example-rendering:
@echo "๐จ Running rendering test..."
cargo run --example rendering_test -p windjammer-game
example-window:
@echo "๐ช Running window test..."
cargo run --example window_test -p windjammer-ui --features desktop
example-http:
@echo "๐ HTTP server example..."
@echo "To test HTTP server:"
@echo " 1. cargo run -- examples/serve_ui_wasm.wj"
@echo " 2. curl http://127.0.0.1:8080/"
bench:
@echo "โก Running benchmarks..."
cargo bench --workspace
bench-compiler:
@echo "โก Benchmarking compiler..."
cargo bench -p windjammer
clean:
@echo "๐งน Cleaning build artifacts..."
cargo clean
rebuild: clean build-all
pre-commit: fmt-check clippy test
@echo "โ
Pre-commit checks passed!"
dev: fmt clippy test-quick
@echo "โ
Quick dev cycle complete!"
ci: fmt-check clippy test build-all
@echo "โ
CI checks complete!"
watch:
@echo "๐ Watching for changes..."
cargo watch -x "test --all-features"
watch-stdlib:
cargo watch -x "test -p windjammer-runtime"
watch-ui:
cargo watch -x "test -p windjammer-ui"
watch-game:
cargo watch -x "test -p windjammer-game"
release-check: check doc
@echo "โ
Release ready!"
@echo ""
@echo "Next steps:"
@echo " 1. Review CHANGELOG.md"
@echo " 2. git commit -am 'chore: prepare release'"
@echo " 3. git push origin feature-branch"
@echo " 4. Create pull request"
stats:
@echo "๐ Project Statistics"
@echo "====================="
@echo ""
@echo "Lines of code:"
@find src crates -name '*.rs' | xargs wc -l | tail -1
@echo ""
@echo "Test count:"
@cargo test --workspace --all-features -- --list 2>/dev/null | grep -c "test " || echo "Run 'make test' first"
@echo ""
@echo "Crates:"
@ls -1 crates/ | wc -l
@echo ""
@echo "Dependencies:"
@cargo tree --workspace --depth 1 | wc -l
version:
@echo "Windjammer Version Info"
@echo "======================="
@grep '^version' Cargo.toml | head -1
@echo ""
@echo "Crate versions:"
@for crate in windjammer-lsp windjammer-mcp windjammer-ui windjammer-game windjammer-runtime; do \
echo -n " $$crate: "; \
grep '^version' crates/$$crate/Cargo.toml | head -1 | cut -d'"' -f2; \
done
test-wasm:
@echo "๐งช Testing WASM target..."
cargo test --target wasm32-unknown-unknown -p windjammer-ui
test-minimal:
@echo "๐งช Testing minimal features..."
cargo test --no-default-features
test-memory:
@echo "๐งช Memory leak detection..."
@which valgrind > /dev/null || (echo "โ valgrind not installed" && exit 1)
cargo build --tests
valgrind --leak-check=full --show-leak-kinds=all \
target/debug/deps/windjammer-* --test-threads=1
todos:
@echo "๐ TODOs in codebase:"
@grep -r "TODO" src crates --include="*.rs" | wc -l
todos-list:
@echo "๐ TODO items:"
@grep -rn "TODO" src crates --include="*.rs"
changes:
@echo "๐ Recent commits:"
@git log --oneline -10
branch:
@echo "Current branch: $$(git branch --show-current)"
@echo "Status:"
@git status -s