all: setup validate

setup:
	curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
	rustup toolchain install 1.47.0
	rustup override set 1.47.0
	rustup component add clippy
	rustup component add rustfmt

build:
	cargo build

lint:
	cargo +nightly fmt --all
	cargo +nightly clippy --all --tests --all-targets --all-features

test:
	cargo test --all --verbose

validate: build lint test
