.PHONY: fmt fmt: cargo fmt --all cargo machete cargo sort --grouped --workspace .PHONY: clippy clippy: cargo fmt --all --check && cargo -q clippy --all-targets -- -D rust_2018_idioms -D warnings .PHONY: clean clean: cargo clean rm -rf docs .PHONY: build build: clean fmt clippy cargo build .PHONY: release-build release-build: clean rust_tools fmt build_prerequisite cargo build --release .PHONY: test test: cargo test .PHONY: docs docs: cargo rustdoc --lib --all-features -- --cfg docsrs rm -rf docs mv target/doc docs git diff --exit-code -- ./docs .PHONY: example example: cargo run --example list_device cargo run --example show_topology cargo run --example show_p2p .PHONY: readme_prerequisite readme_prerequisite: cargo install cargo-readme .PHONY: readme readme: readme_prerequisite rm -f README.md && cargo readme --no-title --no-license --no-indent-headings | sed 's/,compile_fail//g' > README.md && git diff --exit-code -- README.md