Skip to content

chore: migrate from Makefile to justfile#143

Open
tac0turtle wants to merge 1 commit intomainfrom
chore/migrate-makefile-to-justfile
Open

chore: migrate from Makefile to justfile#143
tac0turtle wants to merge 1 commit intomainfrom
chore/migrate-makefile-to-justfile

Conversation

@tac0turtle
Copy link
Contributor

@tac0turtle tac0turtle commented Feb 25, 2026

Replace Makefile with justfile for local development. CI workflows inline cargo/cross/docker commands directly to avoid adding just as a CI dependency.

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring

Related Issues

Fixes #(issue)

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Testing

Additional Notes

Summary by CodeRabbit

  • Documentation

    • Updated all development, build, and test command examples across documentation
    • Added high-level architecture overview
  • Chores

    • Migrated build automation system from Makefile to Justfile
    • Enhanced Docker CI/CD workflows with multi-architecture cross-compilation support for x86_64 and aarch64
    • Removed legacy Makefile configuration

Replace Makefile with justfile for local development. CI workflows
inline cargo/cross/docker commands directly to avoid adding just as
a CI dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 25, 2026

📝 Walkthrough

Walkthrough

This pull request migrates the project's build automation from GNU Make to the Justfile tool. The Makefile is removed entirely, replaced with a new justfile containing equivalent build, test, and deployment targets. Documentation and CI/CD workflows are updated to reference the new just command syntax instead of make targets.

Changes

Cohort / File(s) Summary
Documentation Updates
.claude/skills/ev-reth-core.md, .claude/skills/ev-reth-evolve.md, .claude/skills/ev-reth-testing.md, CLAUDE.md, README.md
Command references updated from make targets to just equivalents; CLAUDE.md also adds a new High-Level Architecture section detailing Ev-reth components and transaction flow.
Build System
Makefile, justfile
Makefile completely removed (171 lines); new justfile introduced (163 lines) defining variables and targets for building, testing, development, maintenance, documentation, and Docker operations with cross-compilation support via cross and Docker Buildx.
CI/CD Workflows
.github/workflows/docker.yml, .github/workflows/release.yml
Docker workflow replaced with multi-step cross-compilation and multi-architecture build flow using cross and docker buildx for x86_64 and aarch64 targets; release workflow updated to use cargo build with explicit RUSTFLAGS and feature flags instead of make build-maxperf.

Sequence Diagram(s)

sequenceDiagram
    participant CI as CI Pipeline
    participant Just as Justfile
    participant Cross as Cross Compiler
    participant Buildx as Docker Buildx
    participant Registry as Registry

    CI->>Just: just docker-build-push
    Just->>Cross: cross build (x86_64-linux-gnu)
    Cross-->>Just: dist/bin/linux/amd64
    Just->>Cross: cross build (aarch64-linux-gnu)
    Cross-->>Just: dist/bin/linux/arm64
    Just->>Buildx: docker buildx build --push (multi-arch)
    Buildx->>Buildx: linux/amd64, linux/arm64
    Buildx->>Registry: push multi-arch image
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Poem

🐰 Farewell, Make's old rules and ways,
Just arrived to brighten our days,
With justfile's clarity so clear,
Cross-compiled builds bring us cheer,
Build automation hops on with delight! 🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description provides a summary of changes and mentions CI workflow adjustments, but most checklist items and testing section remain unfilled with placeholders. Fill in the checklist items (particularly self-review, documentation changes, and tests run) and provide details in the Testing section about how the justfile was validated.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: migrating the build system from Makefile to justfile.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/migrate-makefile-to-justfile

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tac0turtle tac0turtle marked this pull request as ready for review February 25, 2026 12:52
@tac0turtle tac0turtle requested a review from a team as a code owner February 25, 2026 12:52
@tac0turtle tac0turtle requested a review from auricom February 25, 2026 12:52
@claude
Copy link

claude bot commented Feb 25, 2026

Claude finished @tac0turtle's task —— View job


Pull Request Review

Reviewing the migration from Makefile to justfile for local development.

Review Tasks

  • Analyze deleted Makefile functionality
  • Review new justfile implementation
  • Check documentation updates
  • Review CI workflow changes
  • Assess security and performance implications
  • Provide comprehensive feedback

Overall Assessment ✅

This is a well-executed migration that successfully modernizes the build system while maintaining full feature parity. The changes are safe, beneficial, and properly implemented.

Code Quality & Best Practices ✅

Justfile Implementation:

  • Excellent syntax: Uses proper justfile conventions with {{variable}} interpolation
  • Good organization: Logical sections with clear separators and comments
  • Consistent naming: Matches original Makefile target names exactly
  • Smart defaults: Uses default: @just --list to show available commands
  • Environment variables: Properly configured with sensible defaults

Key Improvements over Makefile:

  • Cleaner variable interpolation syntax ({{cargo}} vs $(CARGO))
  • Better cross-platform support
  • More expressive recipe dependencies
  • Built-in command listing functionality

Feature Parity Analysis ✅

I compared the deleted Makefile (171 lines) with the new justfile (163 lines) and confirmed 100% feature parity:

Build targets: All preserved (build, build-dev, build-maxperf, build-all)
Test targets: Complete coverage (test, test-verbose, test-unit, test-integration, test-node, test-evolve, test-common)
Development targets: All maintained (run, run-dev, fmt, lint, check, check-all)
Docker targets: Full cross-arch support preserved (docker-build, docker-build-push, docker-build-push-latest)
Documentation: Complete (doc, doc-all)
Maintenance: All utilities (clean, update, audit)

Documentation Updates ✅

CLAUDE.md: Properly updated all build commands from make to just (justfile:8-28)
README.md: Updated installation and usage examples consistently (README.md:139,557-561)
Claude Skills: All .claude/skills/ files correctly updated to reference just commands

CI Workflow Analysis ✅

Smart CI Strategy: The PR correctly avoids adding just as a CI dependency by inlining commands:

Docker workflow (.github/workflows/docker.yml:79-89):

  • Replaced make docker-build-push with inline cross build and docker buildx commands
  • Maintains identical functionality while avoiding additional CI dependencies
  • Environment variable handling preserved correctly

Release workflow (.github/workflows/release.yml:44):

  • Replaced make build-maxperf with direct cargo build --profile maxperf
  • Maintains exact same build flags and behavior

Security Assessment ✅

No security concerns identified:

  • No new network access or external dependencies
  • No changes to credential handling or secrets management
  • Cross-compilation environment variables properly preserved
  • Docker build process unchanged in functionality

Performance Considerations ✅

Positive performance impact:

  • just is generally faster than make for command parsing
  • Better dependency resolution and caching
  • No performance regressions in the actual build processes
  • CI workflows maintain same execution time (no additional tool installation)

Areas of Excellence ✅

  1. Thoughtful CI approach: Avoiding just in CI while benefiting developers locally
  2. Complete documentation updates: No orphaned references to make commands
  3. Proper variable scoping: Docker variables correctly configured with environment fallbacks
  4. Private recipes: Uses [private] attribute appropriately for internal targets
  5. Cross-platform compatibility: All cross-compilation logic preserved

Minor Observations

  1. Line 28 in CLAUDE.md: Contains reference to lumen binary instead of ev-reth - this appears to be a pre-existing issue unrelated to this PR
  2. Consistent formatting: The justfile follows good practices with clear section divisions and commenting

Recommendation: ✅ APPROVE

This migration is ready to merge. It successfully modernizes the development experience while maintaining full backward compatibility in terms of available commands. The approach of keeping CI workflows dependency-free while improving local developer experience is well-balanced and practical.

Key Benefits:

  • Improved developer experience with modern build tool
  • Maintained CI simplicity and reliability
  • Complete feature preservation
  • Enhanced cross-platform support
  • Better documentation organization

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
justfile (1)

135-136: Remove duplicate image tag argument in docker-build-push.

The same tag is provided twice, which is redundant.

♻️ Proposed cleanup
     docker buildx build --file ./Dockerfile.cross . \
         --platform linux/amd64,linux/arm64 \
         --tag {{docker_image}}:{{docker_tag}} \
-        --tag {{docker_image}}:{{docker_tag}} \
         --provenance=false \
         --sbom=false \
         --push
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@justfile` around lines 135 - 136, In the docker-build-push target remove the
duplicated --tag argument: the lines that pass --tag
{{docker_image}}:{{docker_tag}} twice should only include a single --tag; update
the docker-build-push recipe so it only adds one --tag using the existing
variables (docker_image and docker_tag) and remove the redundant duplicate --tag
entry.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release.yml:
- Line 44: The cargo build step currently runs RUSTFLAGS="-C target-cpu=native"
cargo build --profile maxperf --features jemalloc,asm-keccak --bin ev-reth which
omits the cross-compile target and uses the wrong profile; change that
invocation to include --target ${{ matrix.target }} and use --profile release
(or match whatever profile the packaging expects) so artifacts go to the matrix
target directory and the release profile path, and then update the subsequent
packaging steps that create the tarball/zip to point to the correct artifact
paths produced by the modified cargo build.

---

Nitpick comments:
In `@justfile`:
- Around line 135-136: In the docker-build-push target remove the duplicated
--tag argument: the lines that pass --tag {{docker_image}}:{{docker_tag}} twice
should only include a single --tag; update the docker-build-push recipe so it
only adds one --tag using the existing variables (docker_image and docker_tag)
and remove the redundant duplicate --tag entry.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ecfefef and 13413a2.

📒 Files selected for processing (9)
  • .claude/skills/ev-reth-core.md
  • .claude/skills/ev-reth-evolve.md
  • .claude/skills/ev-reth-testing.md
  • .github/workflows/docker.yml
  • .github/workflows/release.yml
  • CLAUDE.md
  • Makefile
  • README.md
  • justfile
💤 Files with no reviewable changes (1)
  • Makefile


- name: Build release binary
run: make build-maxperf
run: RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc,asm-keccak --bin ev-reth
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

f=".github/workflows/release.yml"

echo "[Build command around line 44]"
rg -n 'Build release binary|cargo build' "$f" -A1

echo
echo "[Packaging directories - searching for profile paths]"
rg -n 'target/\$\{\{ matrix.target \}\}' "$f" -B1 -A1

echo
echo "[Matrix target configuration]"
rg -n 'target:' "$f" -A10 | head -30

echo
echo "[Full packaging section]"
sed -n '40,120p' "$f"

Repository: evstack/ev-reth

Length of output: 2964


Build step no longer matches matrix target/profile artifact paths.

Line 44 builds without --target ${{ matrix.target }}, producing artifacts in the wrong location for cross-compilation. Additionally, --profile maxperf outputs to .../maxperf, while packaging steps expect .../release, causing the workflow to fail at the tarball/zip creation step.

🐛 Proposed fix
-        run: RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc,asm-keccak --bin ev-reth
+        run: RUSTFLAGS="-C target-cpu=native" cargo build --target ${{ matrix.target }} --profile maxperf --features jemalloc,asm-keccak --bin ev-reth

Then update the packaging steps (lines 49 and 57):

-          cd target/${{ matrix.target }}/release
+          cd target/${{ matrix.target }}/maxperf
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release.yml at line 44, The cargo build step currently
runs RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features
jemalloc,asm-keccak --bin ev-reth which omits the cross-compile target and uses
the wrong profile; change that invocation to include --target ${{ matrix.target
}} and use --profile release (or match whatever profile the packaging expects)
so artifacts go to the matrix target directory and the release profile path, and
then update the subsequent packaging steps that create the tarball/zip to point
to the correct artifact paths produced by the modified cargo build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant