.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}'
BACKTRACE=RUST_BACKTRACE=1
.PHONY: clippy
clippy:
cargo clippy --all-targets -- -D warnings
.PHONY: format
format:
cargo fmt --all
.PHONY: test
test:
$(BACKTRACE) RUSTFLAGS="-C target-cpu=native" cargo test
.PHONY: test-wasm
test-wasm:
$(BACKTRACE) cargo test --target wasm32-wasip1 --no-default-features
.PHONY: coverage
coverage:
cargo tarpaulin -t 600 --out Html
.PHONY: bench
bench:
RUSTFLAGS="-C target-cpu=native" cargo bench --all-features --profile optimized
.PHONY: clean
clean:
cargo clean
.PHONY: example
example:
RUSTFLAGS="-C target-cpu=native" cargo run --example turboshake128
RUSTFLAGS="-C target-cpu=native" cargo run --example turboshake256
.PHONY: example-wasm
example-wasm:
cargo run --example turboshake128 --target wasm32-wasip1 --no-default-features
cargo run --example turboshake256 --target wasm32-wasip1 --no-default-features