Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ jobs:
- name: Release build
run: |
cd node/web
rustup component add rust-src rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
cargo +nightly build --release --target wasm32-unknown-unknown
wasm-bindgen --keep-debug --web --out-dir pkg ../../target/wasm32-unknown-unknown/release/openmina_node_web.wasm

Expand Down
57 changes: 57 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# OpenMina Makefile

.PHONY: help
help: ## Ask for help!
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: build
build: ## Build the project in debug mode
cargo build

.PHONY: build-release
build-release: ## Build the project in release mode
cargo build --release --bin openmina
Comment on lines +8 to +13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a small nitpick here, but build builds the entire project, while build-release builds only openmina executable

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, lemme fix this.


.PHONY: build-tests
build-tests: ## Build test binaries
cargo build --release --tests --package=openmina-node-testing --package=cli

.PHONY: build-wasm
build-wasm: ## Build WebAssembly node
cd node/web && cargo +nightly build --release --target wasm32-unknown-unknown
Comment on lines +20 to +21
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will build the openmina-node-web library but will not produce code needed to run the webnode for that following command should be used

wasm-pack build --target web --out-dir pkg


.PHONY: check
check: ## Check code for compilation errors
cargo check --all-targets

.PHONY: clean
clean: ## Clean build artifacts
cargo clean

.PHONY: fmt
fmt: ## Format code using rustfmt
cargo fmt --all

.PHONY: lint
lint: ## Run linter (clippy)
cargo clippy --all-targets -- -D warnings --allow clippy::mutable_key_type

.PHONY: test
test: ## Run tests
cargo test

.PHONY: test-ledger
test-ledger: ## Run ledger tests
cd ledger && cargo test --release

.PHONY: test-p2p
test-p2p: ## Run P2P tests
cargo test -p p2p --tests

.PHONY: test-release
test-release: ## Run tests in release mode
cargo test --release

.PHONY: test-vrf
test-vrf: ## Run VRF tests
cd vrf && cargo test --release
1 change: 1 addition & 0 deletions rust-toolchain
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.84