.PHONY: help
help:
@echo ======================================================================================
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
@echo ======================================================================================
.PHONY: bench
bench:
@cargo bench --bench arithmetic
@cargo bench --bench orderbook
.PHONY: bench-page
bench-page:
@.dev/bench-report html
.PHONY: bench-report
bench-report:
@python3 -c "import webbrowser; webbrowser.open('file://$(PWD)/target/criterion/report/index.html')"
.PHONY: bench-save
bench-save:
@.dev/bench-report save --run
.PHONY: bench-table
bench-table:
@.dev/bench-report table
.PHONY: docs
docs:
@cargo doc --all-features --no-deps
.PHONY: docs-open
docs-open:
@cargo doc --all-features --no-deps --open
.PHONY: release
release:
$(eval VERSION := $(shell grep '^version' Cargo.toml | head -1 | sed 's/version = "\(.*\)"/\1/'))
@read -p "Tagging with v$(VERSION), are you sure? [Y/n] " ans; \
ans=$${ans:-Y}; \
if [ "$$ans" = "Y" ] || [ "$$ans" = "y" ]; then \
git tag -a v$(VERSION) -m "v$(VERSION)" && git push origin v$(VERSION); \
else \
echo "Aborted."; \
fi
.PHONY: rs-fuzz
rs-fuzz:
@PROPTEST_CASES=$${PROPTEST_CASES:-100000} cargo test --release --test fuzz
.PHONY: rs-lint
rs-lint:
@.dev/rs-lint fix
.PHONY: rs-oracle
rs-oracle:
@cargo test --release --test oracle
.PHONY: rs-publish
rs-publish:
@cargo publish --token $(CARGO_REGISTRY_TOKEN)
.PHONY: rs-test
rs-test:
@cargo test --all-features