@@ -8,6 +8,10 @@ help: ## Ask for help!
88build : # # Build the project in debug mode
99 cargo build
1010
11+ .PHONY : build-ledger
12+ build-ledger : download-circuits # # Build the ledger binary and library, requires nightly Rust
13+ @cd ledger && cargo +nightly build --release --tests
14+
1115.PHONY : build-release
1216build-release : # # Build the project in release mode
1317 cargo build --release --bin openmina
@@ -16,9 +20,14 @@ build-release: ## Build the project in release mode
1620build-tests : # # Build test binaries
1721 cargo build --release --tests --package=openmina-node-testing --package=cli
1822
23+ .PHONY : build-vrf
24+ build-vrf : # # Build the VRF package
25+ @cd vrf && cargo +nightly build --release --tests
26+
1927.PHONY : build-wasm
2028build-wasm : # # Build WebAssembly node
21- cd node/web && cargo +nightly build --release --target wasm32-unknown-unknown
29+ @cd node/web && cargo +nightly build --release --target wasm32-unknown-unknown
30+ @wasm-bindgen --keep-debug --web --out-dir pkg target/wasm32-unknown-unknown/release/openmina_node_web.wasm
2231
2332.PHONY : check
2433check : # # Check code for compilation errors
@@ -36,6 +45,15 @@ check-format: ## Check code formatting
3645clean : # # Clean build artifacts
3746 cargo clean
3847
48+ .PHONY : download-circuits
49+ download-circuits : # # Download the circuits used by Mina from GitHub
50+ @if [ ! -d " circuit-blobs" ]; then \
51+ git clone --depth 1 https://github.com/openmina/circuit-blobs.git; \
52+ ln -s -b " $$ PWD" /circuit-blobs/* ledger/; \
53+ else \
54+ echo " circuit-blobs already exists, skipping download." ; \
55+ fi
56+
3957.PHONY : format
4058format : # # Format code using rustfmt
4159 cargo +nightly fmt
@@ -49,8 +67,8 @@ test: ## Run tests
4967 cargo test
5068
5169.PHONY : test-ledger
52- test-ledger : # # Run ledger tests
53- cd ledger && cargo test --release
70+ test-ledger : build-ledger # # Run ledger tests in release mode, requires nightly Rust
71+ @ cd ledger && cargo +nightly test --release -- -Z unstable-options --report-time
5472
5573.PHONY : test-p2p
5674test-p2p : # # Run P2P tests
@@ -61,5 +79,5 @@ test-release: ## Run tests in release mode
6179 cargo test --release
6280
6381.PHONY : test-vrf
64- test-vrf : # # Run VRF tests
65- cd vrf && cargo test --release
82+ test-vrf : # # Run VRF tests, requires nightly Rust
83+ @ cd vrf && cargo +nightly test --release -- -Z unstable-options --report-time
0 commit comments