feat: add native FreeBSD/powerpc64le binding#6398
Conversation
|
@pkubaj is attempting to deploy a commit to the rollup-js Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
lukastaegert
left a comment
There was a problem hiding this comment.
Thanks for taking the initiative. However without CI changes, no artifact will be built, making this not so useful.
|
If it helps, we could move to a newer nightly build, provided it supports all necessary platforms and features. |
|
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? |
|
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 |
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.
|
CI added. |
There was a problem hiding this comment.
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-freebsdto the N-API build targets inpackage.json. - Add a new platform/arch mapping (
freebsd+ppc64) innative.jsand introduce the corresponding@rollup/rollup-freebsd-ppc64npm 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.
|
Please check the failing build. Getting things to actually build is usually the hardest part. |
|
I've just sent an upstream cross PR for adding powerpc64le-unknown-freebsd: cross-rs/cross#1781 |
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:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description