Skip to content

chore: adds a makefile with basic rust targets #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Usage:
# make # build (debug)
# make run # cargo run (debug)
# make release # optimized build
# make test # run unit + integration tests
# make fmt # check & auto‑format
# make clippy # full‑feature lint, deny warnings
# make doc # build docs
# make clean # remove target dir
# ----------------------------------------------------

CARGO ?= cargo
FEATURES ?= --all-features
TARGETS ?= --all-targets
PROFILE ?= dev # override with `make PROFILE=release build`
CLIPPY_FLAGS ?= $(TARGETS) $(FEATURES) --workspace --profile dev -- -D warnings
FMT_FLAGS ?= --all

.PHONY: build release run test clean fmt clippy default

default: build

#-------------------- Core tasks --------------------

build:
$(CARGO) build --profile $(PROFILE)

release:
$(CARGO) build --release

run:
$(CARGO) run --bin zenith-builder-example

test:
$(CARGO) test

clean:
$(CARGO) clean

fmt:
$(CARGO) fmt

clippy:
$(CARGO) clippy $(CLIPPY_FLAGS)

tx-submitter:
$(CARGO) run --bin transaction-submitter