Skip to content

chore(build): enhance Makefile and dev.mk for cross-building support - #152

Open
marlon-costa-dc wants to merge 1 commit into
mainfrom
bugfix/pages-deploy-skip
Open

chore(build): enhance Makefile and dev.mk for cross-building support#152
marlon-costa-dc wants to merge 1 commit into
mainfrom
bugfix/pages-deploy-skip

Conversation

@marlon-costa-dc

Copy link
Copy Markdown
Collaborator
  • Add TARGET variable to Makefile for specifying build target.
  • Update build command in dev.mk to support cross-compilation with TARGET.
  • Minor adjustments to comments for clarity in build instructions.
  • Clean up CHANGELOG by removing unreleased section.

- Add TARGET variable to Makefile for specifying build target.
- Update build command in dev.mk to support cross-compilation with TARGET.
- Minor adjustments to comments for clarity in build instructions.
- Clean up CHANGELOG by removing unreleased section.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@marlon-costa-dc, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 9e58bbd0-a99a-47bd-af37-f216a760e94e

📥 Commits

Reviewing files that changed from the base of the PR and between a6d22a3 and 8888add.

📒 Files selected for processing (5)
  • .github/workflows/pages.yml
  • .github/workflows/release.yml
  • Makefile
  • docs/operations/CHANGELOG.md
  • make/dev.mk
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/pages-deploy-skip

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.

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Build: add TARGET support for cross-compilation via Make and CI

⚙️ Configuration changes 📝 Documentation 🕐 10-20 Minutes

Grey Divider

AI Description

• Add a Makefile-level TARGET variable to enable cross-compiling builds.
• Route Windows release CI builds through make build with an explicit target triple.
• Remove the empty CHANGELOG “Unreleased” placeholder section to reduce noise.
Diagram

graph TD
  A["GitHub Actions: release.yml"] --> B["make build (TARGET=triple)"] --> C["make/dev.mk: build"] --> D["cargo build --target"] --> E["target/<triple>/release"] --> F["dist/ (release assets)"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep CI using raw `cargo build --target` per job
  • ➕ Avoids indirection through Make for a single step
  • ➕ CI remains explicit about the exact cargo invocation
  • ➖ Duplicates build logic between local dev and CI
  • ➖ Future build flags/logic changes require touching multiple workflows
2. Use `CARGO_BUILD_TARGET` (env) instead of a Make TARGET variable
  • ➕ Leverages Cargo’s native environment configuration
  • ➕ Can apply broadly without modifying recipes
  • ➖ Less discoverable than make build TARGET=... for contributors
  • ➖ Still needs careful propagation/overrides across environments
3. Adopt `cross`/`cargo-zigbuild` for cross-compilation
  • ➕ More robust cross-compilation story for non-native targets
  • ➕ Reduces platform-specific toolchain friction
  • ➖ Adds tooling/dependency overhead and learning curve
  • ➖ May not be necessary if CI only needs Rust target selection

Recommendation: The chosen approach (standardizing on make build and threading TARGET through to Cargo) is a good tradeoff: it reduces CI/local divergence while keeping the implementation minimal. Consider cross/cargo-zigbuild only if you later need non-trivial cross toolchains beyond selecting Rust targets.

Files changed (5) +6 / -11

Enhancement (1) +3 / -3
dev.mkAdd optional '--target' support to build recipes +3/-3

Add optional '--target' support to build recipes

• Updates 'build' to conditionally append '--target $(TARGET)' for both debug and release builds, and clarifies help text with a cross-build example.

make/dev.mk

Documentation (2) +1 / -7
pages.ymlTidy Pages workflow comment formatting +1/-1

Tidy Pages workflow comment formatting

• Adjusts a comment line describing how pages.yml is superseded by release.yml. No functional workflow behavior changes.

.github/workflows/pages.yml

CHANGELOG.mdRemove empty Unreleased placeholder section +0/-6

Remove empty Unreleased placeholder section

• Drops the unused '[Unreleased]' section that contained no entries, leaving version sections (e.g., 0.3.0) as the primary changelog structure.

docs/operations/CHANGELOG.md

Other (2) +2 / -1
release.ymlUse 'make build' for Windows release builds with target triple +1/-1

Use 'make build' for Windows release builds with target triple

• Replaces the Windows job’s direct 'cargo build --target' invocation with 'make build RELEASE=1 TARGET=${{ matrix.target }}' to align CI with the Make-based build entrypoint.

.github/workflows/release.yml

MakefileExpose a top-level TARGET variable for builds +1/-0

Expose a top-level TARGET variable for builds

• Adds an exported 'TARGET' variable to make target selection available to recipes and included makefiles, enabling consistent cross-build configuration.

Makefile

@qodo-code-review

qodo-code-review Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 36 rules

Grey Divider


Remediation recommended

1. Trailing whitespace added 🐞 Bug ⚙ Maintainability
Description
A trailing space was introduced in .github/workflows/pages.yml, which will be flagged by the
configured trailing-whitespace hook when pre-commit (or any formatting gate using it) is run.
Code

.github/workflows/pages.yml[6]

+# Superseded by release.yml for tag-triggered deployment. 
Evidence
The modified Pages workflow comment line ends with an extra space, and the repository’s pre-commit
configuration enables the trailing-whitespace hook that flags such changes.

.github/workflows/pages.yml[1-8]
.pre-commit-config.yaml[26-33]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
A workflow comment line contains a trailing whitespace character. This is typically flagged/auto-fixed by repo formatting hooks and can cause local pre-commit runs (and any CI that invokes them) to fail.

### Issue Context
The repo config includes the standard `pre-commit-hooks` `trailing-whitespace` check.

### Fix Focus Areas
- .github/workflows/pages.yml[6-6]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Previous review results

Review updated until commit 8888add ⚖️ Balanced

Results up to commit 8888add ⚖️ Balanced


🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0) 📜 Skill insights (0)


Remediation recommended
1. Trailing whitespace added 🐞 Bug ⚙ Maintainability
Description
A trailing space was introduced in .github/workflows/pages.yml, which will be flagged by the
configured trailing-whitespace hook when pre-commit (or any formatting gate using it) is run.
Code

.github/workflows/pages.yml[6]

+# Superseded by release.yml for tag-triggered deployment. 
Evidence
The modified Pages workflow comment line ends with an extra space, and the repository’s pre-commit
configuration enables the trailing-whitespace hook that flags such changes.

.github/workflows/pages.yml[1-8]
.pre-commit-config.yaml[26-33]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
A workflow comment line contains a trailing whitespace character. This is typically flagged/auto-fixed by repo formatting hooks and can cause local pre-commit runs (and any CI that invokes them) to fail.

### Issue Context
The repo config includes the standard `pre-commit-hooks` `trailing-whitespace` check.

### Fix Focus Areas
- .github/workflows/pages.yml[6-6]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Qodo Logo

# =============================================================================
# Manual workflow: triggered via workflow_dispatch only
# Superseded by release.yml for tag-triggered deployment.
# Superseded by release.yml for tag-triggered deployment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remediation recommended

1. Trailing whitespace added 🐞 Bug ⚙ Maintainability

A trailing space was introduced in .github/workflows/pages.yml, which will be flagged by the
configured trailing-whitespace hook when pre-commit (or any formatting gate using it) is run.
Agent Prompt
### Issue description
A workflow comment line contains a trailing whitespace character. This is typically flagged/auto-fixed by repo formatting hooks and can cause local pre-commit runs (and any CI that invokes them) to fail.

### Issue Context
The repo config includes the standard `pre-commit-hooks` `trailing-whitespace` check.

### Fix Focus Areas
- .github/workflows/pages.yml[6-6]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code review by qodo was updated up to the latest commit 8888add

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 5 files

Confidence score: 5/5

  • In .github/workflows/pages.yml, the trailing space in the comment is a whitespace-only change that could trigger lint/editor whitespace checks and create avoidable CI or commit noise—remove the extra space to keep the workflow clean and deterministic.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/pages.yml">

<violation number="1" location=".github/workflows/pages.yml:6">
P3: This comment now has a trailing space after the period. Removing it would keep the workflow free of whitespace-only noise and avoid failures in repositories or editors that enforce trailing-whitespace checks.</violation>
</file>

Shadow auto-approve: would not auto-approve because issues were found.

Fix all with cubic | Re-trigger cubic

# =============================================================================
# Manual workflow: triggered via workflow_dispatch only
# Superseded by release.yml for tag-triggered deployment.
# Superseded by release.yml for tag-triggered deployment.

@cubic-dev-ai cubic-dev-ai Bot Jul 29, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: This comment now has a trailing space after the period. Removing it would keep the workflow free of whitespace-only noise and avoid failures in repositories or editors that enforce trailing-whitespace checks.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/pages.yml, line 6:

<comment>This comment now has a trailing space after the period. Removing it would keep the workflow free of whitespace-only noise and avoid failures in repositories or editors that enforce trailing-whitespace checks.</comment>

<file context>
@@ -3,7 +3,7 @@
 # =============================================================================
 # Manual workflow: triggered via workflow_dispatch only
-# Superseded by release.yml for tag-triggered deployment.
+# Superseded by release.yml for tag-triggered deployment. 
 # This workflow is kept as a manual emergency fallback only.
 # Builds and deploys documentation (mdBook + Rust API docs) to GitHub Pages
</file context>
Suggested change
# Superseded by release.yml for tag-triggered deployment.
# Superseded by release.yml for tag-triggered deployment.
Fix with cubic

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.

2 participants