ifneq ($(DEBUG),)
CARGO_TEST_ARGS = -vv -- --nocapture
export RUSTFLAGS=-D warnings
endif
default: build check doc
build:
cargo build
check: test examples
test: unit-test test-coverage
test-coverage:
cargo tarpaulin -v
unit-test:
cargo test $(CARGO_TEST_ARGS)
examples:
cargo run --example simple -- -a foo -d -a bar -d -a baz
cargo run --example positional-args-only -- one two "hello world" three "foo bar" four "the end"
cargo run --example option-and-positional-args -- "posn 1" -d "posn 2" -a "hello world" -a "foo bar" "the end" -d
doc:
cargo doc
clean:
cargo clean
.PHONY: check
.PHONY: clean
.PHONY: default
.PHONY: doc
.PHONY: examples
.PHONY: test
.PHONY: test-coverage
.PHONY: unit-test