FMT_CMD := fmt --all
FMT_CHECK_CMD := fmt --all -- --check
CLIPPY_CMD := clippy --all-targets --all-features -- -D warnings
.PHONY: all fmt fmt-check lint test check clean doc build build-release run ci
all: check
fmt:
@echo "Running rustfmt across all files..."
cargo $(FMT_CMD)
fmt-check:
@echo "Checking code formatting..."
cargo $(FMT_CHECK_CMD)
lint:
@echo "Running cargo clippy with zero-warning policy..."
cargo $(CLIPPY_CMD)
test:
@echo "Running all tests..."
cargo test --all-features
check: fmt-check lint test
@echo "✅ All code quality checks passed."
build:
@echo "Building with default features..."
cargo build
build-all:
@echo "Building with all features..."
cargo build --all-features
build-release:
@echo "Building in release mode with all features..."
cargo build --release --all-features
build-server:
@echo "Building with server feature..."
cargo build --features server
build-flux:
@echo "Building with flux feature..."
cargo build --features flux
run:
@echo "Running synheart-sensor..."
cargo run
run-server:
@echo "Running synheart-sensor with server feature..."
cargo run --features server
run-all:
@echo "Running synheart-sensor with all features..."
cargo run --all-features
demo:
@echo "Running capture demo..."
cargo run --example capture_demo
clean:
@echo "Cleaning build artifacts..."
cargo clean
doc:
@echo "Generating documentation..."
cargo doc --no-deps --all-features
help-cli:
@echo "Showing CLI help..."
cargo run -- --help
ci: fmt-check lint test
@echo "✅ CI checks passed."