1
1
# Mina Makefile
2
2
3
3
# Rust
4
+ # This should be in line with the verison in:
5
+ # - Makefile
6
+ # - ./github/workflows/docs.yaml
7
+ # - ./github/workflows/fmt.yaml
8
+ # - ./github/workflows/lint.yaml
4
9
NIGHTLY_RUST_VERSION = "nightly-2025-08-18"
5
10
6
11
# Docker
@@ -35,7 +40,7 @@ build: ## Build the project in debug mode
35
40
36
41
.PHONY : build-ledger
37
42
build-ledger : download-circuits # # Build the ledger binary and library, requires nightly Rust
38
- @cd ledger && cargo +nightly build --release --tests
43
+ @cd ledger && cargo +$( NIGHTLY_RUST_VERSION ) build --release --tests
39
44
40
45
.PHONY : build-release
41
46
build-release : # # Build the project in release mode
@@ -82,7 +87,7 @@ build-tests-webrtc: ## Build tests for WebRTC
82
87
83
88
.PHONY : build-vrf
84
89
build-vrf : # # Build the VRF package
85
- @cd vrf && cargo +nightly build --release --tests
90
+ @cd vrf && cargo +$( NIGHTLY_RUST_VERSION ) build --release --tests
86
91
87
92
.PHONY : build-wasm
88
93
build-wasm : # # Build WebAssembly node
@@ -99,11 +104,11 @@ check: ## Check code for compilation errors
99
104
100
105
.PHONY : check-tx-fuzzing
101
106
check-tx-fuzzing : # # Check the transaction fuzzing tools, requires nightly Rust
102
- @cd tools/fuzzing && cargo +nightly check
107
+ @cd tools/fuzzing && cargo +$( NIGHTLY_RUST_VERSION ) check
103
108
104
109
.PHONY : check-format
105
110
check-format : # # Check code formatting
106
- cargo +nightly fmt -- --check
111
+ cargo +$( NIGHTLY_RUST_VERSION ) fmt -- --check
107
112
taplo format --check
108
113
109
114
.PHONY : check-md
@@ -172,7 +177,7 @@ download-circuits: ## Download the circuits used by Mina from GitHub
172
177
173
178
.PHONY : format
174
179
format : # # Format code using rustfmt and taplo
175
- cargo +nightly fmt
180
+ cargo +$( NIGHTLY_RUST_VERSION ) fmt
176
181
taplo format
177
182
178
183
.PHONY : format-md
@@ -236,7 +241,7 @@ test: ## Run tests
236
241
237
242
.PHONY : test-ledger
238
243
test-ledger : build-ledger # # Run ledger tests in release mode, requires nightly Rust
239
- @cd ledger && cargo +nightly test --release -- -Z unstable-options --report-time
244
+ @cd ledger && cargo +$( NIGHTLY_RUST_VERSION ) test --release -- -Z unstable-options --report-time
240
245
241
246
.PHONY : test-p2p
242
247
test-p2p : # # Run P2P tests
@@ -248,7 +253,7 @@ test-release: ## Run tests in release mode
248
253
249
254
.PHONY : test-vrf
250
255
test-vrf : # # Run VRF tests, requires nightly Rust
251
- @cd vrf && cargo +nightly test --release -- -Z unstable-options --report-time
256
+ @cd vrf && cargo +$( NIGHTLY_RUST_VERSION ) test --release -- -Z unstable-options --report-time
252
257
253
258
.PHONY : nextest
254
259
nextest : # # Run tests with cargo-nextest for faster execution
@@ -264,11 +269,11 @@ nextest-p2p: ## Run P2P tests with cargo-nextest
264
269
265
270
.PHONY : nextest-ledger
266
271
nextest-ledger : build-ledger # # Run ledger tests with cargo-nextest, requires nightly Rust
267
- @cd ledger && cargo +nightly nextest run --release
272
+ @cd ledger && cargo +$( NIGHTLY_RUST_VERSION ) nextest run --release
268
273
269
274
.PHONY : nextest-vrf
270
275
nextest-vrf : # # Run VRF tests with cargo-nextest, requires nightly Rust
271
- @cd vrf && cargo +nightly nextest run --release
276
+ @cd vrf && cargo +$( NIGHTLY_RUST_VERSION ) nextest run --release
272
277
273
278
# Docker build targets
274
279
@@ -478,7 +483,7 @@ docs-rust: ## Generate Rust API documentation
478
483
@echo " Generating Rust API documentation..."
479
484
# Using nightly with --enable-index-page to generate workspace index
480
485
# See: https://github.com/rust-lang/cargo/issues/8229
481
- @DATABASE_URL=" sqlite::memory:" RUSTDOCFLAGS=" --enable-index-page -Zunstable-options -D warnings" cargo +nightly doc --no-deps --document-private-items --workspace --exclude heartbeats-processor --lib --bins
486
+ @DATABASE_URL=" sqlite::memory:" RUSTDOCFLAGS=" --enable-index-page -Zunstable-options -D warnings" cargo +$( NIGHTLY_RUST_VERSION ) doc --no-deps --document-private-items --workspace --exclude heartbeats-processor --lib --bins
482
487
@echo " Rust documentation generated in target/doc/"
483
488
@echo " Entry point: target/doc/index.html"
484
489
0 commit comments