.PHONY: all
all:: ci
.PHONY: check-features
check-features:
cargo hack check --feature-powerset --no-dev-deps
.PHONY: check-fmt
check-fmt:
cargo fmt -- --config imports_granularity=Item --config format_code_in_doc_comments=true --check
.PHONY: fmt
fmt:
cargo fmt -- --config imports_granularity=Item --config format_code_in_doc_comments=true
.PHONY: clippy
clippy:
cargo clippy --all-targets --all-features
.PHONY: test
test:
cargo nextest run --all-features
cargo test --all-features --doc
.PHONY: check-no-std
check-no-std:
rustup target add aarch64-unknown-none
cargo hack build --target aarch64-unknown-none --feature-powerset --no-dev-deps --skip std
.PHONY: doc
doc:
RUSTDOCFLAGS="-Dwarnings --cfg=docsrs -Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo doc --all-features --no-deps -Zrustdoc-scrape-examples
.PHONY: doc-open
doc-open:
RUSTDOCFLAGS="--cfg=docsrs -Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo doc --all-features --no-deps --open -Zrustdoc-scrape-examples
.PHONY: is-dirty
is-dirty:
@(test -z "$$(git diff)" || (git diff && false)) && (test -z "$$(git status --porcelain)" || (git status --porcelain && false))
.PHONY: ci
ci: test clippy check-fmt check-features check-no-std
.PHONY: ci-full
ci-full: ci doc
.PHONY: clean
clean:
cargo clean
.PHONY: clean-all
clean-all: clean
git clean -dXf
.PHONY: help
help:
@echo "Available targets:"
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)