11# Mina Makefile
22
33# 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
49NIGHTLY_RUST_VERSION = "nightly-2025-08-18"
510
611# Docker
@@ -35,7 +40,7 @@ build: ## Build the project in debug mode
3540
3641.PHONY : build-ledger
3742build-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
3944
4045.PHONY : build-release
4146build-release : # # Build the project in release mode
@@ -82,7 +87,7 @@ build-tests-webrtc: ## Build tests for WebRTC
8287
8388.PHONY : build-vrf
8489build-vrf : # # Build the VRF package
85- @cd vrf && cargo +nightly build --release --tests
90+ @cd vrf && cargo +$( NIGHTLY_RUST_VERSION ) build --release --tests
8691
8792.PHONY : build-wasm
8893build-wasm : # # Build WebAssembly node
@@ -99,11 +104,11 @@ check: ## Check code for compilation errors
99104
100105.PHONY : check-tx-fuzzing
101106check-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
103108
104109.PHONY : check-format
105110check-format : # # Check code formatting
106- cargo +nightly fmt -- --check
111+ cargo +$( NIGHTLY_RUST_VERSION ) fmt -- --check
107112 taplo format --check
108113
109114.PHONY : check-md
@@ -172,7 +177,7 @@ download-circuits: ## Download the circuits used by Mina from GitHub
172177
173178.PHONY : format
174179format : # # Format code using rustfmt and taplo
175- cargo +nightly fmt
180+ cargo +$( NIGHTLY_RUST_VERSION ) fmt
176181 taplo format
177182
178183.PHONY : format-md
@@ -236,7 +241,7 @@ test: ## Run tests
236241
237242.PHONY : test-ledger
238243test-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
240245
241246.PHONY : test-p2p
242247test-p2p : # # Run P2P tests
@@ -248,7 +253,7 @@ test-release: ## Run tests in release mode
248253
249254.PHONY : test-vrf
250255test-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
252257
253258.PHONY : nextest
254259nextest : # # Run tests with cargo-nextest for faster execution
@@ -264,11 +269,11 @@ nextest-p2p: ## Run P2P tests with cargo-nextest
264269
265270.PHONY : nextest-ledger
266271nextest-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
268273
269274.PHONY : nextest-vrf
270275nextest-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
272277
273278# Docker build targets
274279
@@ -478,7 +483,7 @@ docs-rust: ## Generate Rust API documentation
478483 @echo " Generating Rust API documentation..."
479484 # Using nightly with --enable-index-page to generate workspace index
480485 # 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
482487 @echo " Rust documentation generated in target/doc/"
483488 @echo " Entry point: target/doc/index.html"
484489
0 commit comments