.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 --profile test-release
$(BACKTRACE) RUSTFLAGS="-C target-cpu=native" cargo test --profile test-release --features parallel
.PHONY: test-wasm
test-wasm:
$(BACKTRACE) cargo test --target wasm32-wasip1 --profile test-release --no-default-features
$(BACKTRACE) cargo test --target wasm32-wasip2 --profile test-release --no-default-features
.PHONY: coverage
coverage:
cargo tarpaulin -t 600 --profile test-release --out Html
.PHONY: bench
bench:
RUSTFLAGS="-C target-cpu=native" cargo bench --profile optimized
RUSTFLAGS="-C target-cpu=native" cargo bench --profile optimized --features parallel
.PHONY: clean
clean:
cargo clean
.PHONY: example
example:
RUSTFLAGS="-C target-cpu=native" cargo run --example full_rlnc
RUSTFLAGS="-C target-cpu=native" cargo run --example full_rlnc --features parallel
.PHONY: example-wasm
example-wasm:
cargo run --example full_rlnc --target wasm32-wasip1 --no-default-features
cargo run --example full_rlnc --target wasm32-wasip2 --no-default-features