miden-gpu 0.5.0

GPU acceleration for the Miden VM prover
Documentation
.DEFAULT_GOAL := help

.PHONY: help
help:
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

# -- variables ------------------------------------------------------------------------------------

METAL_FLAGS=
all: shaders
debug: METAL_FLAGS += -fdebug-info-for-profiling
debug: shaders
shaders: 
	xcrun -sdk macosx metal $(METAL_FLAGS) -c src/metal/shaders/shaders.metal -o src/metal/shaders/shaders.air
	xcrun -sdk macosx metallib src/metal/shaders/shaders.air -o src/metal/shaders/shaders.metallib


# -- linting --------------------------------------------------------------------------------------

.PHONY: clippy
clippy: ## Runs Clippy with configs
	cargo clippy --all-targets --all-features -- -D warnings

.PHONY: fix
fix: ## Runs Fix with configs
	cargo fix --allow-staged --allow-dirty --all-targets --all-features


.PHONY: format
format: ## Runs Format using nightly toolchain
	cargo +nightly fmt --all


.PHONY: format-check
format-check: ## Runs Format using nightly toolchain but only in check mode
	cargo +nightly fmt --all --check


.PHONY: lint
lint: ## Runs all linting tasks at once (Clippy, fixing, formatting)
	$(MAKE) format
	$(MAKE) fix
	$(MAKE) clippy