# SSD1677 Driver - Justfile
# Common development tasks
# Default recipe - show available commands
default:
@just --list
# Setup development environment (install rust components)
setup:
@echo "๐ง Setting up development environment..."
@echo "Installing required rustup components..."
rustup component add rustfmt clippy
@echo "โ
Setup complete! Run 'just all' to verify everything works."
# Run all checks (format, lint, type-check, test, doc, doctest)
all: format lint type-check test doc-test doc
@echo "โ
All checks passed!"
# Format code with rustfmt
format:
@echo "๐จ Formatting code..."
cargo fmt
# Check formatting without modifying files
check-format:
@echo "๐ Checking code formatting..."
cargo fmt -- --check
# Run clippy lints
lint:
@echo "๐ Running clippy..."
cargo clippy --all-features -- -D warnings
# Run clippy with pedantic lints (stricter)
lint-strict:
@echo "๐ Running clippy (strict)..."
cargo clippy --all-features -- -D warnings -W clippy::pedantic -W clippy::nursery
# Type check the code
type-check:
@echo "๐ Type checking..."
cargo check --all-features
# Type check without graphics feature
type-check-minimal:
@echo "๐ Type checking (minimal)..."
cargo check --no-default-features
# Build the crate
build:
@echo "๐จ Building..."
cargo build --all-features
# Build release version
build-release:
@echo "๐จ Building release..."
cargo build --release --all-features
# Run tests
test:
@echo "๐งช Running tests..."
cargo test --all-features
# Run doctests (docs.rs-like examples)
doc-test:
@echo "๐งช Running doc tests..."
cargo test --doc
# Run doctests marked as ignored (if any)
doc-test-ignored:
@echo "๐งช Running ignored doc tests..."
cargo test --doc -- --ignored
# Run tests without graphics
test-minimal:
@echo "๐งช Running tests (minimal)..."
cargo test --no-default-features
# Build documentation
doc:
@echo "๐ Building documentation..."
cargo doc --all-features --no-deps
# Build and open documentation
doc-open:
@echo "๐ Building and opening documentation..."
cargo doc --all-features --no-deps --open
# Clean build artifacts
clean:
@echo "๐งน Cleaning..."
cargo clean
# Dry run publish to verify everything is ready
publish-dry:
@echo "๐ฆ Testing publish (dry run)..."
cargo publish --dry-run
# Full CI simulation locally
ci: check-format lint type-check test doc-test doc publish-dry
@echo "โ
CI checks passed!"
# Fix common issues automatically
fix: format
@echo "๐ง Running cargo fix..."
cargo fix --all-features --allow-dirty --allow-staged
# Update dependencies
update:
@echo "๐ฆ Updating dependencies..."
cargo update
# Show dependency tree
tree:
cargo tree
# Show dependency tree with features
tree-features:
cargo tree -e features
# Generate coverage report (requires cargo-tarpaulin)
coverage:
@echo "๐ Generating coverage report..."
cargo tarpaulin --all-features --out Html
# Check code size (requires cargo-bloat)
size:
@echo "๐ Checking code size..."
cargo bloat --all-features --release
# Run benchmarks (if any)
bench:
@echo "โก Running benchmarks..."
cargo bench --all-features
# Check for outdated dependencies (requires cargo-outdated)
outdated:
@echo "๐ฆ Checking for outdated dependencies..."
cargo outdated
# Quick development cycle: check + test
dev:
@echo "๐ Quick dev cycle..."
cargo check --all-features && cargo test --all-features