Skip to content

feat: add native FreeBSD/powerpc64le binding#6398

Open
pkubaj wants to merge 2 commits into
rollup:masterfrom
pkubaj:add_freebsd_ppc64
Open

feat: add native FreeBSD/powerpc64le binding#6398
pkubaj wants to merge 2 commits into
rollup:masterfrom
pkubaj:add_freebsd_ppc64

Conversation

@pkubaj

@pkubaj pkubaj commented May 30, 2026

Copy link
Copy Markdown

Register the freebsd-ppc64 binding (powerpc64le-unknown-freebsd) so
Rollup runs natively on FreeBSD/powerpc64le instead of failing over to
the WASM build. The fallback is not usable here because a
rollup.config.js that imports from "rollup" loads native.js, which
currently throws for this platform/arch.

Currently no CI due to that platform being Tier 3 in Rust.
Tested on FreeBSD 15.1-BETA1 with Rust 1.95.0.

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no - requires a native builder, but it will likely work if other freebsd targets and other ppc64 targets work

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

Description

@vercel

vercel Bot commented May 30, 2026

Copy link
Copy Markdown

@pkubaj is attempting to deploy a commit to the rollup-js Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented May 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rollup Ready Ready Preview, Comment Jun 6, 2026 4:45am

Request Review

@codecov

codecov Bot commented May 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.78%. Comparing base (f2f58c4) to head (1158dfb).
⚠️ Report is 24 commits behind head on master.

⚠️ Current head 1158dfb differs from pull request most recent head dc61806

Please upload reports for the commit dc61806 to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6398   +/-   ##
=======================================
  Coverage   98.78%   98.78%           
=======================================
  Files         274      274           
  Lines       10789    10795    +6     
  Branches     2882     2883    +1     
=======================================
+ Hits        10658    10664    +6     
  Misses         89       89           
  Partials       42       42           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lukastaegert lukastaegert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for taking the initiative. However without CI changes, no artifact will be built, making this not so useful.

@lukastaegert

Copy link
Copy Markdown
Member

If it helps, we could move to a newer nightly build, provided it supports all necessary platforms and features.

@pkubaj

pkubaj commented Jun 2, 2026

Copy link
Copy Markdown
Author

OK, I need some explanation. There is freebsd-arm64 support upstreamed here to rollup and artifacts are available, even though aarch64-freebsd is Tier 3 in Rust, so there's no prebuilt binaries. Why is that? What are the next steps for me to push? Should it be getting powerpc64le-freebsd to Tier 2 in Rust or something else?

@lukastaegert

Copy link
Copy Markdown
Member

To be honest I do not really care about tiers. If you manage to set up a running build pipeline in CI for that target, then we can ship that. That is the part you did not do. For that, you need to extend build-and-tests.yml, like in this commit 72b0f0e

@lukastaegert lukastaegert marked this pull request as draft June 3, 2026 08:32
Register the freebsd-ppc64 binding (powerpc64le-unknown-freebsd) so
Rollup runs natively on FreeBSD/powerpc64le instead of failing over to
the WASM build. The fallback is not usable here because a
rollup.config.js that imports from "rollup" loads native.js, which
currently throws for this platform/arch.

Currently no CI due to that platform being Tier 3 in Rust.
Tested on FreeBSD 15.1-BETA1 with Rust 1.95.0.
@pkubaj pkubaj force-pushed the add_freebsd_ppc64 branch from 1158dfb to 7d346cb Compare June 3, 2026 10:03
@pkubaj

pkubaj commented Jun 3, 2026

Copy link
Copy Markdown
Author

CI added.

@lukastaegert lukastaegert marked this pull request as ready for review June 6, 2026 04:43
Copilot AI review requested due to automatic review settings June 6, 2026 04:43
@lukastaegert lukastaegert enabled auto-merge June 6, 2026 04:44

Copilot AI left a comment

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.

Pull request overview

This PR registers a new native N-API binding for freebsd on ppc64 (Rust target powerpc64le-unknown-freebsd) so Rollup can load native.js successfully on FreeBSD/powerpc64le instead of falling back to (or failing with) the WASM path.

Changes:

  • Add powerpc64le-unknown-freebsd to the N-API build targets in package.json.
  • Add a new platform/arch mapping (freebsd + ppc64) in native.js and introduce the corresponding @rollup/rollup-freebsd-ppc64 npm package.
  • Extend the GitHub Actions build matrix to cross-build powerpc64le-unknown-freebsd.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Registers powerpc64le-unknown-freebsd as a N-API build target.
npm/freebsd-ppc64/README.md Adds README for the new FreeBSD/ppc64 native package.
npm/freebsd-ppc64/package.json Defines the new @rollup/rollup-freebsd-ppc64 optional native binding package.
native.js Adds freebsd + ppc64 mapping so the correct native package is selected at runtime.
.github/workflows/build-and-tests.yml Adds cross-build job entry for powerpc64le-unknown-freebsd.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lukastaegert

Copy link
Copy Markdown
Member

Please check the failing build. Getting things to actually build is usually the hardest part.

@pkubaj

pkubaj commented Jun 6, 2026

Copy link
Copy Markdown
Author

I've just sent an upstream cross PR for adding powerpc64le-unknown-freebsd: cross-rs/cross#1781

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.

3 participants