cargo:
@awk 'BEGIN {FS = ":.*?##### "} /^[a-zA-Z_-]+:.*?##### / {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
cargo-build:
@type -P rustup && rustup default nightly
@. $(HOME)/.cargo/env
@echo cargo b
@cargo b
cargo-i:cargo-install
cargo-install:
@cargo install --path $(PWD)
cargo-check:
@. $(HOME)/.cargo/env
@echo cargo c
@cargo c
cargo-bench:
@. $(HOME)/.cargo/env
@echo cargo bench
@cargo bench
cargo-clean:
@. $(HOME)/.cargo/env
@echo cargo clean
@cargo clean
cargo-test:
@. $(HOME)/.cargo/env
@echo cargo test
@cargo test
cargo-b-release:cargo-build-release
cargo-build-release:
type -P rustup && rustup default nightly
cargo b --release
cargo-publish:
@type -P rustup && rustup default nightly
@. $(HOME)/.cargo/env
@echo cargo publish
@cargo publish
rustup-install:rustup-install-stable
rustup-install-stable:
$(shell echo which rustup) || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable --profile default && . "$(HOME)/.cargo/env"
$(shell echo which rustup) && rustup default stable
rustup-install-nightly:
$(shell echo which rustup) || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain nightly --profile default && . "$(HOME)/.cargo/env"
$(shell echo which rustup) && rustup default nightly